CMS 3D CMS Logo

L1GtCondition.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 
22 // user include files
23 
24 // forward declarations
25 
26 // constructor
27 // empty
31  m_condChipNr = -1;
32  m_condGEq = false;
33 
34  // the rest of private members are C++ initialized
35 }
36 
37 // constructor from condition name
39  m_condName = cName;
40 
43  m_condChipNr = -1;
44 }
45 
46 // constructor from condition name, category and type
48  const L1GtConditionCategory& cCategory,
49  const L1GtConditionType& cType) {
50  m_condName = cName;
51  m_condCategory = cCategory;
52  m_condType = cType;
53 
54  m_condChipNr = -1;
55 }
56 
58  // empty
59 }
60 
61 // get number of trigger objects
62 const int L1GtCondition::nrObjects() const {
63  switch (m_condType) {
64  case TypeNull:
65  case TypeExternal:
66  case TypeCastor:
67  case TypeBptx: {
68  return 0;
69  }
70 
71  break;
72  case Type1s: {
73  return 1;
74  }
75 
76  break;
77  case Type2s:
78  case Type2wsc:
79  case Type2cor: {
80  return 2;
81  }
82 
83  break;
84  case Type3s: {
85  return 3;
86  }
87 
88  break;
89  case Type4s: {
90  return 4;
91  }
92 
93  break;
94  case TypeETT:
95  case TypeETM:
96  case TypeHTT:
97  case TypeHTM:
98  case TypeJetCounts:
99  case TypeHfBitCounts:
100  case TypeHfRingEtSums: {
101  return 1;
102  }
103 
104  break;
105  default: {
106  // TODO no such type, throw exception?
107  return 0;
108  } break;
109  }
110 }
111 
112 // get logic flag for conditions, same type of trigger objects,
113 // and with spatial correlations
114 const bool L1GtCondition::wsc() const {
115  if (m_condType == Type2wsc) {
116  return true;
117  }
118 
119  return false;
120 }
121 
122 // get logic flag for conditions, different type of trigger objects,
123 // and with spatial correlations
124 const bool L1GtCondition::corr() const {
125  if (m_condType == Type2cor) {
126  return true;
127  }
128 
129  return false;
130 }
131 
132 // print condition
133 void L1GtCondition::print(std::ostream& myCout) const {
134  myCout << "\n Condition name: " << m_condName << std::endl;
135 
136  switch (m_condCategory) {
137  case CondNull: {
138  myCout << " Condition category: "
139  << "CondNull"
140  << " - it means not defined!" << std::endl;
141  }
142 
143  break;
144  case CondMuon: {
145  myCout << " Condition category: "
146  << "CondMuon" << std::endl;
147  }
148 
149  break;
150  case CondCalo: {
151  myCout << " Condition category: "
152  << "CondCalo" << std::endl;
153  }
154 
155  break;
156  case CondEnergySum: {
157  myCout << " Condition category: "
158  << "CondEnergySum" << std::endl;
159  }
160 
161  break;
162  case CondJetCounts: {
163  myCout << " Condition category: "
164  << "CondJetCounts" << std::endl;
165  }
166 
167  break;
168  case CondCorrelation: {
169  myCout << " Condition category: "
170  << "CondCorrelation" << std::endl;
171  }
172 
173  break;
174  case CondCastor: {
175  myCout << " Condition category: "
176  << "CondCastor" << std::endl;
177  }
178 
179  break;
180  case CondHfBitCounts: {
181  myCout << " Condition category: "
182  << "CondHfBitCounts" << std::endl;
183  }
184 
185  break;
186  case CondHfRingEtSums: {
187  myCout << " Condition category: "
188  << "CondHfRingEtSums" << std::endl;
189  }
190 
191  break;
192  case CondBptx: {
193  myCout << " Condition category: "
194  << "CondBptx" << std::endl;
195  }
196 
197  break;
198  case CondExternal: {
199  myCout << " Condition category: "
200  << "CondExternal" << std::endl;
201  }
202 
203  break;
204  default: {
205  myCout << " Condition category: " << m_condCategory
206  << " - no such category defined. Check L1GtConditionCategory enum." << std::endl;
207 
208  } break;
209  }
210 
211  switch (m_condType) {
212  case TypeNull: {
213  myCout << " Condition type: "
214  << "TypeNull"
215  << " - it means not defined!" << std::endl;
216  }
217 
218  break;
219  case Type1s: {
220  myCout << " Condition type: "
221  << "Type1s" << std::endl;
222  }
223 
224  break;
225  case Type2s: {
226  myCout << " Condition type: "
227  << "Type2s" << std::endl;
228  }
229 
230  break;
231  case Type2wsc: {
232  myCout << " Condition type: "
233  << "Type2wsc" << std::endl;
234  }
235 
236  break;
237  case Type2cor: {
238  myCout << " Condition type: "
239  << "Type2cor" << std::endl;
240  }
241 
242  break;
243  case Type3s: {
244  myCout << " Condition type: "
245  << "Type3s" << std::endl;
246  }
247 
248  break;
249  case Type4s: {
250  myCout << " Condition type: "
251  << "Type4s" << std::endl;
252  }
253 
254  break;
255  case TypeETM: {
256  myCout << " Condition type: "
257  << "TypeETM" << std::endl;
258  }
259 
260  break;
261  case TypeETT: {
262  myCout << " Condition type: "
263  << "TypeETT" << std::endl;
264  }
265 
266  break;
267  case TypeHTT: {
268  myCout << " Condition type: "
269  << "TypeHTT" << std::endl;
270  }
271 
272  break;
273  case TypeHTM: {
274  myCout << " Condition type: "
275  << "TypeHTM" << std::endl;
276  }
277 
278  break;
279  case TypeJetCounts: {
280  myCout << " Condition type: "
281  << "TypeJetCounts" << std::endl;
282  }
283 
284  break;
285  case TypeCastor: {
286  myCout << " Condition type: "
287  << "TypeCastor" << std::endl;
288  }
289 
290  break;
291  case TypeHfBitCounts: {
292  myCout << " Condition type: "
293  << "TypeHfBitCounts" << std::endl;
294  }
295 
296  break;
297  case TypeHfRingEtSums: {
298  myCout << " Condition type: "
299  << "TypeHfRingEtSums" << std::endl;
300  }
301 
302  break;
303  case TypeBptx: {
304  myCout << " Condition type: "
305  << "TypeBptx" << std::endl;
306  }
307 
308  break;
309  case TypeExternal: {
310  myCout << " Condition type: "
311  << "TypeExternal" << std::endl;
312  }
313 
314  break;
315  default: {
316  myCout << " Condition type: " << m_condType << " - no such type defined. Check L1GtConditionType enum."
317  << std::endl;
318  } break;
319  }
320 
321  myCout << " Object types: ";
322 
323  for (unsigned int i = 0; i < m_objectType.size(); ++i) {
324  switch (m_objectType[i]) {
325  case Mu: {
326  myCout << " Mu ";
327  }
328 
329  break;
330  case NoIsoEG: {
331  myCout << " NoIsoEG ";
332  }
333 
334  break;
335  case IsoEG: {
336  myCout << " IsoEG ";
337  }
338 
339  break;
340  case CenJet: {
341  myCout << " CenJet ";
342  }
343 
344  break;
345  case ForJet: {
346  myCout << " ForJet ";
347  }
348 
349  break;
350  case TauJet: {
351  myCout << " TauJet ";
352  }
353 
354  break;
355  case ETM: {
356  myCout << " ETM ";
357  }
358 
359  break;
360  case ETT: {
361  myCout << " ETT ";
362  }
363 
364  break;
365  case HTT: {
366  myCout << " HTT ";
367  }
368 
369  break;
370  case HTM: {
371  myCout << " HTM ";
372  }
373 
374  break;
375  case JetCounts: {
376  myCout << " JetCounts ";
377  }
378 
379  break;
380  case HfBitCounts: {
381  myCout << " HfBitCounts ";
382  }
383 
384  break;
385  case HfRingEtSums: {
386  myCout << " HfRingEtSums ";
387  }
388 
389  break;
390  case BPTX: {
391  myCout << " BPTX ";
392  }
393 
394  break;
395  case GtExternal: {
396  myCout << " GtExternal ";
397  }
398 
399  break;
400  default: {
401  myCout << " Unknown type " << m_objectType[i];
402  } break;
403  }
404  }
405 
406  myCout << std::endl;
407 
408  myCout << " \" >= \" flag: " << m_condGEq << std::endl;
409 
410  myCout << " Condition chip: " << m_condChipNr;
411 
412  if (m_condChipNr < 0) {
413  myCout << " - not properly initialized! ";
414  }
415 
416  myCout << std::endl;
417 }
418 
419 // output stream operator
420 std::ostream& operator<<(std::ostream& os, const L1GtCondition& result) {
421  result.print(os);
422  return os;
423 }
L1GtCondition::L1GtCondition
L1GtCondition()
Definition: L1GtCondition.cc:28
L1GtCondition
Definition: L1GtCondition.h:35
L1GtCondition::m_condCategory
L1GtConditionCategory m_condCategory
the category of the condition
Definition: L1GtCondition.h:104
L1GtCondition::m_condType
L1GtConditionType m_condType
the type of the condition (1s, etc)
Definition: L1GtCondition.h:107
HTM
Definition: L1GtObject.h:38
mps_fire.i
i
Definition: mps_fire.py:428
GtExternal
Definition: L1GtObject.h:45
CondBptx
Definition: L1GtDefinitions.h:36
TypeCastor
Definition: L1GtDefinitions.h:17
L1GtCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: L1GtCondition.h:113
L1GtCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: L1GtCondition.cc:62
TypeJetCounts
Definition: L1GtDefinitions.h:16
ETM
Definition: L1GtObject.h:35
TypeBptx
Definition: L1GtDefinitions.h:20
TypeETM
Definition: L1GtDefinitions.h:12
CondMuon
Definition: L1GtDefinitions.h:28
L1GtCondition::wsc
const bool wsc() const
Definition: L1GtCondition.cc:114
L1GtCondition::corr
const bool corr() const
Definition: L1GtCondition.cc:124
NoIsoEG
Definition: L1GtObject.h:30
CondEnergySum
Definition: L1GtDefinitions.h:30
CondJetCounts
Definition: L1GtDefinitions.h:31
IsoEG
Definition: L1GtObject.h:31
TypeHfBitCounts
Definition: L1GtDefinitions.h:18
L1GtConditionCategory
L1GtConditionCategory
condition categories
Definition: L1GtDefinitions.h:26
TypeETT
Definition: L1GtDefinitions.h:13
CondNull
Definition: L1GtDefinitions.h:27
TypeHTM
Definition: L1GtDefinitions.h:15
HTT
Definition: L1GtObject.h:37
HfBitCounts
Definition: L1GtObject.h:40
HfRingEtSums
Definition: L1GtObject.h:41
CenJet
Definition: L1GtObject.h:32
CondExternal
Definition: L1GtDefinitions.h:37
L1GtCondition::~L1GtCondition
virtual ~L1GtCondition()
destructor
Definition: L1GtCondition.cc:57
TypeExternal
Definition: L1GtDefinitions.h:21
L1GtConditionType
L1GtConditionType
Definition: L1GtDefinitions.h:4
TauJet
Definition: L1GtObject.h:34
Type2wsc
Definition: L1GtDefinitions.h:8
TypeHfRingEtSums
Definition: L1GtDefinitions.h:19
L1GtCondition.h
CondCastor
Definition: L1GtDefinitions.h:33
Type3s
Definition: L1GtDefinitions.h:10
CondCalo
Definition: L1GtDefinitions.h:29
ETT
Definition: L1GtObject.h:36
operator<<
std::ostream & operator<<(std::ostream &os, const L1GtCondition &result)
Definition: L1GtCondition.cc:420
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CondHfBitCounts
Definition: L1GtDefinitions.h:34
L1GtCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: L1GtCondition.h:116
Mu
Definition: L1GtObject.h:29
Type2cor
Definition: L1GtDefinitions.h:9
Type1s
Definition: L1GtDefinitions.h:6
L1GtCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: L1GtCondition.cc:133
Type2s
Definition: L1GtDefinitions.h:7
Type4s
Definition: L1GtDefinitions.h:11
ForJet
Definition: L1GtObject.h:33
CondHfRingEtSums
Definition: L1GtDefinitions.h:35
JetCounts
Definition: L1GtObject.h:39
BPTX
Definition: L1GtObject.h:44
L1GtCondition::m_objectType
std::vector< L1GtObject > m_objectType
the trigger object type(s)
Definition: L1GtCondition.h:110
mps_fire.result
result
Definition: mps_fire.py:311
TypeNull
Definition: L1GtDefinitions.h:5
L1GtCondition::m_condName
std::string m_condName
the name of the condition
Definition: L1GtCondition.h:101
TypeHTT
Definition: L1GtDefinitions.h:14
CondCorrelation
Definition: L1GtDefinitions.h:32