CMS 3D CMS Logo

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