CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtTrigReportEntry.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 #include <string>
22 
23 // user include files
24 
25 // constructor(s)
26 L1GtTrigReportEntry::L1GtTrigReportEntry(const std::string& menuName, const std::string& algName,
27  const int prescaleFactor, const int triggerMask, const int daqPartition) {
28 
29  m_triggerMenuName = menuName;
30  m_algoName = algName;
32  m_triggerMask = triggerMask;
33  m_daqPartition = daqPartition;
34 
35  // counters
36 
37  m_nrEventsAccept = 0;
38  m_nrEventsReject = 0;
41  m_nrEventsError = 0;
42 }
43 
44 // destructor
46 
47  //empty
48 
49 }
50 
51 // assignment operator
53  const L1GtTrigReportEntry& repEntry)
54 {
55 
56  if ( this != &repEntry ) {
57 
59 
60  m_algoName = repEntry.m_algoName;
61 
63 
64  m_triggerMask = repEntry.m_triggerMask;
65 
66  m_daqPartition = repEntry.m_daqPartition;
67  }
68 
69  return *this;
70 
71 }
72 
73 // equal operator
75 {
76 
77  // faster comparisons first
78 
79  if (m_daqPartition != repEntry.m_daqPartition) {
80  return false;
81  }
82 
83  if (m_triggerMask != repEntry.m_triggerMask) {
84  return false;
85  }
86 
87  if (m_prescaleFactor != repEntry.m_prescaleFactor) {
88  return false;
89  }
90 
91  if (m_algoName != repEntry.m_algoName) {
92  return false;
93  }
94 
95  if (m_triggerMenuName != repEntry.m_triggerMenuName) {
96  return false;
97  }
98 
99 
100  // all members identical
101  return true;
102 
103 }
104 
105 // unequal operator
107 {
108 
109  return !( result == *this);
110 
111 }
112 
113 // member functions
114 
116 void L1GtTrigReportEntry::addValidEntry(const bool algResultAfterMask,
117  const bool algResultBeforeMask)
118 {
119 
120  if (algResultAfterMask) {
122  }
123  else {
125  }
126 
127  if (algResultBeforeMask) {
129  }
130  else {
132  }
133 
134 }
135 
138 
139  m_nrEventsError++;
140 }
bool operator!=(const L1GtTrigReportEntry &) const
unequal operator
std::string m_triggerMenuName
menu name
int m_daqPartition
index of the DAQ partition
void addValidEntry(const bool algResultAfterMask, const bool algResultBeforeMask)
increase # of events accepted/rejected for this entry
virtual ~L1GtTrigReportEntry()
destructor
int m_nrEventsError
number of events with error
int m_nrEventsRejectBeforeMask
number of events rejected for this entry before applying the trigger masks
L1GtTrigReportEntry(const std::string &menuName, const std::string &algName, const int prescaleFactor, const int triggerMask, const int daqPartition)
constructor
tuple result
Definition: query.py:137
std::string m_algoName
algorithm name
int m_nrEventsAcceptBeforeMask
number of events accepted for this entry before applying the trigger masks
void addErrorEntry()
increase # of events with error
L1GtTrigReportEntry & operator=(const L1GtTrigReportEntry &)
assignment operator
int m_prescaleFactor
prescale factor
int m_nrEventsReject
number of events rejected for this entry
unsigned int m_triggerMask
trigger mask
bool operator==(const L1GtTrigReportEntry &) const
equal operator