CMS 3D CMS Logo

L1GlobalTriggerObjectMapRecord.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 
20 #include <algorithm>
21 
22 // user include files
23 
25 
27 
28 // forward declarations
29 
30 
31 
32 // methods
33 
36  const std::string& algoNameVal) const {
37 
38  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator
39  itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end(); ++itObj) {
40 
41  if (itObj->algoName() == algoNameVal) {
42 
43  return &((*itObj));
44  }
45 
46  }
47 
48  // no algoName found, return zero pointer!
49  edm::LogError("L1GlobalTriggerObjectMapRecord")
50  << " ERROR: The requested algorithm name = " << algoNameVal
51  << " does not exist in the trigger menu."
52  << " Returning zero pointer for getObjectMap." << std::endl;
53 
54  return nullptr;
55 
56 }
57 
60  const int algoBitNumberVal) const {
61 
62  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator
63  itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end(); ++itObj) {
64 
65  if (itObj->algoBitNumber() == algoBitNumberVal) {
66 
67  return &((*itObj));
68  }
69 
70  }
71 
72  // no algoBitNumberVal found, return zero pointer!
73  edm::LogError("L1GlobalTriggerObjectMapRecord")
74  << " ERROR: The requested algorithm with bit number = " << algoBitNumberVal
75  << " does not exist in the trigger menu."
76  << " Returning zero pointer for getObjectMap." << std::endl;
77 
78  return nullptr;
79 
80 }
81 
82 // return all the combinations passing the requirements imposed in condition condNameVal
83 // from algorithm algoNameVal
85  const std::string& algoNameVal, const std::string& condNameVal) const
86 {
87 
88  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
89  itObj != m_gtObjectMap.end(); ++itObj) {
90 
91  if ( itObj->algoName() == algoNameVal ) {
92 
93  return itObj->getCombinationsInCond(condNameVal);
94 
95  }
96  }
97 
98  // no (algoName, condName) found, return zero pointer!
99  edm::LogError("L1GlobalTriggerObjectMapRecord")
100  << " ERROR: The requested (algorithm name, condition name) = ("
101  << algoNameVal << ", " << condNameVal
102  << ") does not exist in the trigger menu."
103  << " Returning zero pointer for getCombinationsInCond."
104  << std::endl;
105 
106  return nullptr;
107 
108 }
109 
110 // return all the combinations passing the requirements imposed in condition condNameVal
111 // from algorithm with bit number algoBitNumberVal
113  const int algoBitNumberVal, const std::string& condNameVal) const
114 {
115 
116  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
117  itObj != m_gtObjectMap.end(); ++itObj) {
118 
119  if ( itObj->algoBitNumber() == algoBitNumberVal ) {
120  return itObj->getCombinationsInCond(condNameVal);
121  }
122  }
123 
124  // no (algoBitNumber, condName) found, return zero pointer!
125  edm::LogError("L1GlobalTriggerObjectMapRecord")
126  << " ERROR: The requested (algorithm bit number, condition name) = ("
127  << algoBitNumberVal << ", " << condNameVal
128  << ") does not exist in the trigger menu."
129  << " Returning zero pointer for getCombinationsInCond."
130  << std::endl;
131 
132  return nullptr;
133 
134 }
135 
136 // return the result for the condition condNameVal
137 // from algorithm with name algoNameVal
139  const std::string& algoNameVal, const std::string& condNameVal) const
140 {
141 
142  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
143  itObj != m_gtObjectMap.end(); ++itObj) {
144 
145  if ( itObj->algoName() == algoNameVal ) {
146  return itObj->getConditionResult(condNameVal);
147  }
148  }
149 
150  // no (algoName, condName) found, return false!
151  edm::LogError("L1GlobalTriggerObjectMapRecord")
152  << " ERROR: The requested (algorithm name, condition name) = ("
153  << algoNameVal << ", " << condNameVal
154  << ") does not exist in the trigger menu."
155  << " Returning false for condition result! Unknown result, in fact!"
156  << std::endl;
157 
158  return false;
159 
160 }
161 
162 // return the result for the condition condNameVal
163 // from algorithm with bit number algoBitNumberVal
165  const int algoBitNumberVal, const std::string& condNameVal) const
166 {
167 
168  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
169  itObj != m_gtObjectMap.end(); ++itObj) {
170 
171  if ( itObj->algoBitNumber() == algoBitNumberVal ) {
172  return itObj->getConditionResult(condNameVal);
173  }
174  }
175 
176  // no (algoBitNumber, condName) found, return false!
177  edm::LogError("L1GlobalTriggerObjectMapRecord")
178  << " ERROR: The requested (algorithm bit number, condition name) = ("
179  << algoBitNumberVal << ", " << condNameVal
180  << ") does not exist in the trigger menu."
181  << " Returning false for condition result! Unknown result, in fact!"
182  << std::endl;
183 
184  return false;
185 
186 }
const CombinationsInCond * getCombinationsInCond(const std::string &algoNameVal, const std::string &condNameVal) const
std::vector< L1GlobalTriggerObjectMap > m_gtObjectMap
bool getConditionResult(const std::string &algoNameVal, const std::string &condNameVal) const
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
const L1GlobalTriggerObjectMap * getObjectMap(const std::string &algoNameVal) const
return the object map for the algorithm algoNameVal