CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Friends
GlobalCondition Class Reference

#include <GlobalCondition.h>

Inheritance diagram for GlobalCondition:
CaloTemplate CorrelationTemplate CorrelationWithOverlapRemovalTemplate EnergySumTemplate ExternalTemplate MuonTemplate

Public Member Functions

const l1t::GtConditionCategorycondCategory () const
 get / set the category of the condition More...
 
const int & condChipNr () const
 get / set the condition-chip number the condition is located on More...
 
const bool condGEq () const
 get / set condition GEq flag More...
 
const std::string & condName () const
 get / set condition name More...
 
const int & condRelativeBx () const
 get / set the condition relative bx More...
 
const l1t::GtConditionTypecondType () const
 get / set the type of the condition (1s, etc) More...
 
const bool corr () const
 
 GlobalCondition ()
 
 GlobalCondition (const std::string &)
 constructor from condition name More...
 
 GlobalCondition (const std::string &, const l1t::GtConditionCategory &, const l1t::GtConditionType &)
 constructor from condition name, category and type More...
 
const int nrObjects () const
 get number of trigger objects More...
 
const std::vector< l1t::GlobalObject > & objectType () const
 get / set the trigger object type(s) in the condition More...
 
virtual void print (std::ostream &myCout) const
 print condition More...
 
void setCondCategory (const l1t::GtConditionCategory &cCategory)
 
void setCondChipNr (const int &cChipNr)
 
void setCondGEq (const bool &cGEq)
 
void setCondName (const std::string &cName)
 
void setCondRelativeBx (const int &cRelativeBx)
 
void setCondType (const l1t::GtConditionType &cType)
 
void setObjectType (const std::vector< l1t::GlobalObject > &objType)
 
const bool wsc () const
 
virtual ~GlobalCondition ()
 destructor More...
 

Protected Attributes

l1t::GtConditionCategory m_condCategory
 the category of the condition More...
 
int m_condChipNr
 condition is located on condition chip m_condChipNr More...
 
bool m_condGEq
 the operator used for the condition (>=, =): true for >= More...
 
std::string m_condName
 the name of the condition More...
 
int m_condRelativeBx
 
l1t::GtConditionType m_condType
 the type of the condition (1s, etc) More...
 
std::vector< l1t::GlobalObjectm_objectType
 the trigger object type(s) More...
 

Friends

std::ostream & operator<< (std::ostream &, const GlobalCondition &)
 output stream operator More...
 

Detailed Description

Description: base class for L1 Global Trigger object templates (condition).

Implementation: <TODO: enter implementation details>

Author
: Brian Winer, OSU Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Description: base class for L1 Global Trigger object templates (condition).

Implementation: <TODO: enter implementation details>

Author
: Vladimir Rekovic, Brian Winer, OSU Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 35 of file GlobalCondition.h.

Constructor & Destructor Documentation

GlobalCondition::GlobalCondition ( )

constructor(s)

Definition at line 29 of file GlobalCondition.cc.

References l1t::CondNull, m_condCategory, m_condChipNr, m_condRelativeBx, m_condType, and l1t::TypeNull.

30 {
31 
34  m_condChipNr = -1;
35  m_condRelativeBx = 0;
36 
37  // the rest of private members are C++ initialized
38 }
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
GlobalCondition::GlobalCondition ( const std::string &  cName)

constructor from condition name

Definition at line 41 of file GlobalCondition.cc.

References l1t::CondNull, m_condCategory, m_condChipNr, m_condName, m_condRelativeBx, m_condType, and l1t::TypeNull.

42 {
43  m_condName = cName;
44 
47  m_condChipNr = -1;
48  m_condRelativeBx = 0;
49 
50 }
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
GlobalCondition::GlobalCondition ( const std::string &  cName,
const l1t::GtConditionCategory cCategory,
const l1t::GtConditionType cType 
)

constructor from condition name, category and type

Definition at line 53 of file GlobalCondition.cc.

References m_condCategory, m_condChipNr, m_condName, m_condRelativeBx, and m_condType.

56 {
57 
58  m_condName = cName;
59  m_condCategory = cCategory;
60  m_condType = cType;
61 
62  m_condChipNr = -1;
63  m_condRelativeBx = 0;
64 
65 }
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
GlobalCondition::~GlobalCondition ( )
virtual

destructor

Definition at line 69 of file GlobalCondition.cc.

70 {
71  // empty
72 }

Member Function Documentation

const l1t::GtConditionCategory& GlobalCondition::condCategory ( ) const
inline

get / set the category of the condition

Definition at line 68 of file GlobalCondition.h.

References m_condCategory.

Referenced by ExternalTemplate::copy(), EnergySumTemplate::copy(), CaloTemplate::copy(), MuonTemplate::copy(), CorrelationTemplate::copy(), and CorrelationWithOverlapRemovalTemplate::copy().

69  {
70  return m_condCategory;
71  }
l1t::GtConditionCategory m_condCategory
the category of the condition
const int& GlobalCondition::condChipNr ( ) const
inline

get / set the condition-chip number the condition is located on

Definition at line 112 of file GlobalCondition.h.

References m_condChipNr.

Referenced by ExternalTemplate::copy(), EnergySumTemplate::copy(), CaloTemplate::copy(), MuonTemplate::copy(), CorrelationTemplate::copy(), and CorrelationWithOverlapRemovalTemplate::copy().

113  {
114  return m_condChipNr;
115  }
int m_condChipNr
condition is located on condition chip m_condChipNr
const bool GlobalCondition::condGEq ( ) const
inline
const std::string& GlobalCondition::condName ( ) const
inline
const int& GlobalCondition::condRelativeBx ( ) const
inline
const l1t::GtConditionType& GlobalCondition::condType ( ) const
inline

get / set the type of the condition (1s, etc)

Definition at line 79 of file GlobalCondition.h.

References m_condType.

Referenced by ExternalTemplate::copy(), EnergySumTemplate::copy(), CaloTemplate::copy(), MuonTemplate::copy(), CorrelationTemplate::copy(), and CorrelationWithOverlapRemovalTemplate::copy().

80  {
81  return m_condType;
82  }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
const bool GlobalCondition::corr ( ) const

get logic flag for conditions, different type of trigger objects, and with spatial correlations

Definition at line 150 of file GlobalCondition.cc.

References m_condType, and l1t::Type2cor.

Referenced by setCondRelativeBx().

151 {
152 
153  if (m_condType == l1t::Type2cor) {
154  return true;
155  }
156 
157  return false;
158 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
const int GlobalCondition::nrObjects ( ) const

get number of trigger objects

Definition at line 75 of file GlobalCondition.cc.

References m_condType, l1t::Type1s, l1t::Type2cor, l1t::Type2corWithOverlapRemoval, l1t::Type2s, l1t::Type2wsc, l1t::Type3s, l1t::Type4s, l1t::TypeETM, l1t::TypeETMHF, l1t::TypeETT, l1t::TypeExternal, l1t::TypeHTM, l1t::TypeHTT, l1t::TypeMinBiasHFM0, l1t::TypeMinBiasHFM1, l1t::TypeMinBiasHFP0, l1t::TypeMinBiasHFP1, l1t::TypeNull, and l1t::TypeTowerCount.

Referenced by CaloTemplate::CaloTemplate(), l1t::MuCondition::checkObjectParameter(), l1t::CaloCondition::checkObjectParameter(), CorrelationTemplate::CorrelationTemplate(), CorrelationWithOverlapRemovalTemplate::CorrelationWithOverlapRemovalTemplate(), EnergySumTemplate::EnergySumTemplate(), l1t::MuCondition::evaluateCondition(), l1t::CaloCondition::evaluateCondition(), MuonTemplate::MuonTemplate(), EnergySumTemplate::print(), CaloTemplate::print(), MuonTemplate::print(), and setCondRelativeBx().

76 {
77 
78  switch (m_condType) {
79 
80  case l1t::TypeNull:
81  case l1t::TypeExternal: {
82  return 0;
83  }
84 
85  break;
86  case l1t::Type1s: {
87  return 1;
88  }
89 
90  break;
91  case l1t::Type2s:
92  case l1t::Type2wsc:
93  case l1t::Type2cor: {
94  return 2;
95  }
96 
97  break;
99  return 3;
100  }
101 
102  break;
103  case l1t::Type3s: {
104  return 3;
105  }
106 
107  break;
108  case l1t::Type4s: {
109  return 4;
110  }
111 
112  break;
113  case l1t::TypeETT:
114  case l1t::TypeETM:
115  case l1t::TypeHTT:
116  case l1t::TypeHTM:
117  case l1t::TypeETMHF:
118  case l1t::TypeTowerCount:
122  case l1t::TypeMinBiasHFM1: {
123  return 1;
124  }
125 
126  break;
127  default: {
128  // TODO no such type, throw exception?
129  return 0;
130  }
131  break;
132  }
133 
134 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
const std::vector<l1t::GlobalObject>& GlobalCondition::objectType ( ) const
inline
void GlobalCondition::print ( std::ostream &  myCout) const
virtual

print condition

Reimplemented in CorrelationWithOverlapRemovalTemplate, CorrelationTemplate, MuonTemplate, CaloTemplate, EnergySumTemplate, and ExternalTemplate.

Definition at line 161 of file GlobalCondition.cc.

References l1t::CondCalo, l1t::CondCorrelation, l1t::CondCorrelationWithOverlapRemoval, l1t::CondEnergySum, l1t::CondExternal, l1t::CondMuon, l1t::CondNull, l1t::gtEG, l1t::gtETM, l1t::gtETMHF, l1t::gtETT, l1t::gtETTem, l1t::gtExternal, l1t::gtHTM, l1t::gtHTT, l1t::gtJet, l1t::gtMinBiasHFM0, l1t::gtMinBiasHFM1, l1t::gtMinBiasHFP0, l1t::gtMinBiasHFP1, l1t::gtMu, l1t::gtTau, l1t::gtTowerCount, mps_fire::i, m_condCategory, m_condChipNr, m_condGEq, m_condName, m_condRelativeBx, m_condType, m_objectType, l1t::Type1s, l1t::Type2cor, l1t::Type2corWithOverlapRemoval, l1t::Type2s, l1t::Type2wsc, l1t::Type3s, l1t::Type4s, l1t::TypeETM, l1t::TypeETMHF, l1t::TypeETT, l1t::TypeETTem, l1t::TypeExternal, l1t::TypeHTM, l1t::TypeHTT, l1t::TypeMinBiasHFM0, l1t::TypeMinBiasHFM1, l1t::TypeMinBiasHFP0, l1t::TypeMinBiasHFP1, l1t::TypeNull, and l1t::TypeTowerCount.

Referenced by operator<<(), ExternalTemplate::print(), EnergySumTemplate::print(), CaloTemplate::print(), MuonTemplate::print(), CorrelationTemplate::print(), CorrelationWithOverlapRemovalTemplate::print(), and setCondRelativeBx().

162 {
163 
164  myCout << "\n Condition name: " << m_condName << std::endl;
165 
166  switch (m_condCategory) {
167  case l1t::CondNull: {
168  myCout << " Condition category: " << "l1t::CondNull"
169  << " - it means not defined!"
170  << std::endl;
171  }
172 
173  break;
174  case l1t::CondMuon: {
175  myCout << " Condition category: " << "l1t::CondMuon" << std::endl;
176  }
177 
178  break;
179  case l1t::CondCalo: {
180  myCout << " Condition category: " << "l1t::CondCalo" << std::endl;
181  }
182 
183  break;
184  case l1t::CondEnergySum: {
185  myCout << " Condition category: " << "CondEnergySum" << std::endl;
186  }
187 
188  break;
189  case l1t::CondCorrelation: {
190  myCout << " Condition category: " << "CondCorrelation" << std::endl;
191  }
192 
193  break;
195  myCout << " Condition category: " << "CondCorrelationWithOverlapRemoval" << std::endl;
196  }
197 
198  break;
199  case l1t::CondExternal: {
200  myCout << " Condition category: " << "CondExternal" << std::endl;
201  }
202 
203  break;
204  default: {
205  myCout << " Condition category: " << m_condCategory
206  << " - no such category defined. Check l1t::GtConditionCategory enum."
207  << std::endl;
208 
209  }
210  break;
211  }
212 
213  switch (m_condType) {
214 
215  case l1t::TypeNull: {
216  myCout << " Condition type: " << "l1t::TypeNull"
217  << " - it means not defined!"
218  << std::endl;
219  }
220 
221  break;
222  case l1t::Type1s: {
223  myCout << " Condition type: " << "l1t::Type1s" << std::endl;
224  }
225 
226  break;
227  case l1t::Type2s: {
228  myCout << " Condition type: " << "l1t::Type2s" << std::endl;
229  }
230 
231  break;
233  myCout << " Condition type: " << "l1t::Type2corWithOverlapRemoval" << std::endl;
234  }
235 
236  break;
237  case l1t::Type2wsc: {
238  myCout << " Condition type: " << "l1t::Type2wsc" << std::endl;
239  }
240 
241  break;
242  case l1t::Type2cor: {
243  myCout << " Condition type: " << "l1t::Type2cor" << std::endl;
244  }
245 
246  break;
247  case l1t::Type3s: {
248  myCout << " Condition type: " << "l1t::Type3s" << std::endl;
249  }
250 
251  break;
252  case l1t::Type4s: {
253  myCout << " Condition type: " << "l1t::Type4s" << std::endl;
254  }
255 
256  break;
257  case l1t::TypeETM: {
258  myCout << " Condition type: " << "TypeETM" << std::endl;
259  }
260 
261  break;
262  case l1t::TypeETT: {
263  myCout << " Condition type: " << "TypeETT" << std::endl;
264  }
265 
266  break;
267  case l1t::TypeHTT: {
268  myCout << " Condition type: " << "TypeHTT" << std::endl;
269  }
270 
271  break;
272  case l1t::TypeHTM: {
273  myCout << " Condition type: " << "TypeHTM" << std::endl;
274  }
275 
276  break;
277  case l1t::TypeETMHF: {
278  myCout << " Condition type: " << "TypeETMHF" << std::endl;
279  }
280 
281  break;
282  case l1t::TypeTowerCount: {
283  myCout << " Condition type: " << "TypeTowerCount" << std::endl;
284  }
285 
286  break;
287  case l1t::TypeMinBiasHFP0: {
288  myCout << " Condition type: " << "TypeMinBiasHFP0" << std::endl;
289  }
290 
291  break;
292  case l1t::TypeMinBiasHFM0: {
293  myCout << " Condition type: " << "TypeMinBiasHFM0" << std::endl;
294  }
295 
296  break;
297  case l1t::TypeMinBiasHFP1: {
298  myCout << " Condition type: " << "TypeMinBiasHFP1" << std::endl;
299  }
300 
301  break;
302  case l1t::TypeMinBiasHFM1: {
303  myCout << " Condition type: " << "TypeMinBiasHFM1" << std::endl;
304  }
305 
306  break;
307  case l1t::TypeETTem: {
308  myCout << " Condition type: " << "TypeETTem" << std::endl;
309  }
310 
311  break;
312  case l1t::TypeExternal: {
313  myCout << " Condition type: " << "TypeExternal" << std::endl;
314  }
315 
316  break;
317  default: {
318  myCout << " Condition type: " << m_condType
319  << " - no such type defined. Check l1t::GtConditionType enum."
320  << std::endl;
321  }
322  break;
323  }
324 
325 
326  myCout << " Object types: ";
327 
328  for (unsigned int i = 0; i < m_objectType.size(); ++i) {
329 
330  switch (m_objectType[i]) {
331  case l1t::gtMu: {
332  myCout << " Mu ";
333  }
334 
335  break;
336  case l1t::gtEG: {
337  myCout << " EG ";
338  }
339 
340  break;
341 
342  case l1t::gtJet: {
343  myCout << " Jet ";
344  }
345 
346  break;
347 
348  case l1t::gtTau: {
349  myCout << " Tau ";
350  }
351 
352  break;
353  case l1t::gtETM: {
354  myCout << " ETM ";
355  }
356 
357  break;
358  case l1t::gtETT: {
359  myCout << " ETT ";
360  }
361 
362  break;
363  case l1t::gtHTT: {
364  myCout << " HTT ";
365  }
366 
367  break;
368  case l1t::gtHTM: {
369  myCout << " HTM ";
370  }
371 
372  break;
373 
374  case l1t::gtETMHF: {
375  myCout << " ETMHF ";
376  }
377 
378  break;
379  case l1t::gtTowerCount: {
380  myCout << " TowerCount ";
381  }
382 
383  break;
384  case l1t::gtMinBiasHFP0: {
385  myCout << " MinBiasHFP0 ";
386  }
387 
388  break;
389  case l1t::gtMinBiasHFM0: {
390  myCout << " MinBiasHFM0 ";
391  }
392 
393  break;
394  case l1t::gtMinBiasHFP1: {
395  myCout << " MinBiasHFP1 ";
396  }
397 
398  break;
399  case l1t::gtMinBiasHFM1: {
400  myCout << " MinBiasHFM1 ";
401  }
402 
403  break;
404  case l1t::gtETTem: {
405  myCout << " ETTem ";
406  }
407 
408  break;
409  case l1t::gtExternal: {
410  myCout << " External ";
411  }
412 
413  break;
414  default: {
415  myCout << " Unknown type " << m_objectType[i];
416  }
417  break;
418  }
419  }
420 
421  myCout << std::endl;
422 
423  myCout << " \" >= \" flag: " << m_condGEq << std::endl;
424 
425  myCout << " Condition chip: " << m_condChipNr;
426 
427  if (m_condChipNr < 0) {
428  myCout << " - not properly initialized! ";
429  }
430 
431  myCout << std::endl;
432 
433  myCout << " Relative BX: " << m_condRelativeBx << std::endl;
434 
435 }
bool m_condGEq
the operator used for the condition (>=, =): true for >=
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
void GlobalCondition::setCondCategory ( const l1t::GtConditionCategory cCategory)
inline

Definition at line 73 of file GlobalCondition.h.

References m_condCategory.

74  {
75  m_condCategory = cCategory;
76  }
l1t::GtConditionCategory m_condCategory
the category of the condition
void GlobalCondition::setCondChipNr ( const int &  cChipNr)
inline
void GlobalCondition::setCondGEq ( const bool &  cGEq)
inline
void GlobalCondition::setCondName ( const std::string &  cName)
inline

Definition at line 62 of file GlobalCondition.h.

References m_condName.

63  {
64  m_condName = cName;
65  }
std::string m_condName
the name of the condition
void GlobalCondition::setCondRelativeBx ( const int &  cRelativeBx)
inline
void GlobalCondition::setCondType ( const l1t::GtConditionType cType)
inline
void GlobalCondition::setObjectType ( const std::vector< l1t::GlobalObject > &  objType)
inline
const bool GlobalCondition::wsc ( ) const

get logic flag for conditions, same type of trigger objects, and with spatial correlations

Definition at line 138 of file GlobalCondition.cc.

References m_condType, and l1t::Type2wsc.

Referenced by l1t::MuCondition::evaluateCondition(), l1t::CaloCondition::evaluateCondition(), CaloTemplate::print(), MuonTemplate::print(), and setCondRelativeBx().

139 {
140 
141  if (m_condType == l1t::Type2wsc) {
142  return true;
143  }
144 
145  return false;
146 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const GlobalCondition result 
)
friend

output stream operator

Definition at line 438 of file GlobalCondition.cc.

Referenced by setCondRelativeBx().

439 {
440  result.print(os);
441  return os;
442 
443 }
virtual void print(std::ostream &myCout) const
print condition

Member Data Documentation

l1t::GtConditionCategory GlobalCondition::m_condCategory
protected
int GlobalCondition::m_condChipNr
protected
bool GlobalCondition::m_condGEq
protected
std::string GlobalCondition::m_condName
protected
int GlobalCondition::m_condRelativeBx
protected
l1t::GtConditionType GlobalCondition::m_condType
protected
std::vector<l1t::GlobalObject> GlobalCondition::m_objectType
protected