CMS 3D CMS Logo

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