DDTExtensions.cxx
Go to the documentation of this file.
2 
3 #include <iostream>
4 
5 
6 
7 bool novaddt::operator==
9 {
10  if (lhs.start() != rhs.start())
11  {
12  std::cout << "MF: The trigger decision start times do not agree!"
13  << "\nMF: lhs = " << lhs.start()
14  << "\nMF: rhs = " << rhs.start()
15  << "\nMF: delta = " << lhs.start() - rhs.start()
16  << std::endl;
17 
18  return false;
19  }
20 
21  if (lhs.duration() != rhs.duration())
22  {
23  std::cout << "MF: The trigger decision duration times do not agree!"
24  << "\nMF: lhs = " << lhs.duration()
25  << "\nMF: rhs = " << rhs.duration()
26  << "\nMF: delta = " << lhs.duration() - rhs.duration()
27  << std::endl;
28 
29  return false;
30  }
31 
32  return true;
33 }
34 
35 
36 
39 {
40  if (subset.start() < set.start())
41  {
42  std::cout << "MF: The trigger decision is not a subset!"
43  << "\nMF: subset start = " << subset.start()
44  << "\nMF: set start = " << set.start()
45  << std::endl;
46 
47  return false;
48  }
49 
50  auto subset_end = subset.start() + subset.duration();
51  auto set_end = set.start() + set.duration();
52 
53  if (subset_end > set_end)
54  {
55  std::cout << "MF: The trigger decision is not a subset!"
56  << "\nMF: subset end = " << subset_end
57  << "\nMF: set end = " << set_end
58  << std::endl;
59 
60  return false;
61  }
62 
63  return true;
64 }
bool is_subset_of(TriggerDecision const &subset, TriggerDecision const &set)
OStream cout
Definition: OStream.cxx:6
TDC::value_type duration() const
TDC::value_type start() const