CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Friends
GtCondition Class Reference

#include <GtCondition.h>

Inheritance diagram for GtCondition:
CaloTemplate CorrelationTemplate EnergySumTemplate 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
 
 GtCondition ()
 
 GtCondition (const std::string &)
 constructor from condition name More...
 
 GtCondition (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< L1GtObject > & 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< L1GtObject > &objType)
 
const bool wsc () const
 
virtual ~GtCondition ()
 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< L1GtObjectm_objectType
 the trigger object type(s) More...
 

Friends

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

Detailed Description

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

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 34 of file GtCondition.h.

Constructor & Destructor Documentation

GtCondition::GtCondition ( )

constructor(s)

Definition at line 28 of file GtCondition.cc.

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

29 {
30 
33  m_condChipNr = -1;
34  m_condRelativeBx = 0;
35 
36  // the rest of private members are C++ initialized
37 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:161
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GtCondition.h:170
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GtCondition.h:158
int m_condRelativeBx
Definition: GtCondition.h:173
GtCondition::GtCondition ( const std::string &  cName)

constructor from condition name

Definition at line 40 of file GtCondition.cc.

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

41 {
42  m_condName = cName;
43 
46  m_condChipNr = -1;
47  m_condRelativeBx = 0;
48 
49 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:161
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GtCondition.h:170
std::string m_condName
the name of the condition
Definition: GtCondition.h:155
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GtCondition.h:158
int m_condRelativeBx
Definition: GtCondition.h:173
GtCondition::GtCondition ( const std::string &  cName,
const l1t::GtConditionCategory cCategory,
const l1t::GtConditionType cType 
)

constructor from condition name, category and type

Definition at line 52 of file GtCondition.cc.

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

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

destructor

Definition at line 68 of file GtCondition.cc.

69 {
70  // empty
71 }

Member Function Documentation

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

get / set the category of the condition

Definition at line 67 of file GtCondition.h.

References m_condCategory.

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

68  {
69  return m_condCategory;
70  }
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GtCondition.h:158
const int& GtCondition::condChipNr ( ) const
inline

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

Definition at line 111 of file GtCondition.h.

References m_condChipNr.

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

112  {
113  return m_condChipNr;
114  }
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GtCondition.h:170
const bool GtCondition::condGEq ( ) const
inline

get / set condition GEq flag

Definition at line 100 of file GtCondition.h.

References m_condGEq.

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

101  {
102  return m_condGEq;
103  }
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
Definition: GtCondition.h:167
const std::string& GtCondition::condName ( ) const
inline

get / set condition name

Definition at line 56 of file GtCondition.h.

References m_condName.

Referenced by EnergySumTemplate::copy(), CaloTemplate::copy(), CorrelationTemplate::copy(), MuonTemplate::copy(), and l1t::TriggerMenuXmlParser::insertConditionIntoMap().

57  {
58  return m_condName;
59  }
std::string m_condName
the name of the condition
Definition: GtCondition.h:155
const int& GtCondition::condRelativeBx ( ) const
inline

get / set the condition relative bx

Definition at line 122 of file GtCondition.h.

References m_condRelativeBx.

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

123  {
124  return m_condRelativeBx;
125  }
int m_condRelativeBx
Definition: GtCondition.h:173
const l1t::GtConditionType& GtCondition::condType ( ) const
inline

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

Definition at line 78 of file GtCondition.h.

References m_condType.

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

79  {
80  return m_condType;
81  }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:161
const bool GtCondition::corr ( ) const

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

Definition at line 143 of file GtCondition.cc.

References m_condType, and l1t::Type2cor.

144 {
145 
146  if (m_condType == l1t::Type2cor) {
147  return true;
148  }
149 
150  return false;
151 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:161
const int GtCondition::nrObjects ( ) const

get number of trigger objects

Definition at line 74 of file GtCondition.cc.

References m_condType, l1t::Type1s, l1t::Type2cor, l1t::Type2s, l1t::Type2wsc, l1t::Type3s, l1t::Type4s, TypeBptx, TypeCastor, TypeETM, TypeETT, TypeExternal, TypeHfBitCounts, TypeHfRingEtSums, TypeHTM, TypeHTT, TypeJetCounts, and l1t::TypeNull.

Referenced by CaloTemplate::CaloTemplate(), CorrelationTemplate::CorrelationTemplate(), EnergySumTemplate::EnergySumTemplate(), MuonTemplate::MuonTemplate(), EnergySumTemplate::print(), CaloTemplate::print(), and MuonTemplate::print().

75 {
76 
77  switch (m_condType) {
78 
79  case l1t::TypeNull:
80  case TypeExternal:
81  case TypeCastor:
82  case TypeBptx: {
83  return 0;
84  }
85 
86  break;
87  case l1t::Type1s: {
88  return 1;
89  }
90 
91  break;
92  case l1t::Type2s:
93  case l1t::Type2wsc:
94  case l1t::Type2cor: {
95  return 2;
96  }
97 
98  break;
99  case l1t::Type3s: {
100  return 3;
101  }
102 
103  break;
104  case l1t::Type4s: {
105  return 4;
106  }
107 
108  break;
109  case TypeETT:
110  case TypeETM:
111  case TypeHTT:
112  case TypeHTM:
113  case TypeJetCounts:
114  case TypeHfBitCounts:
115  case TypeHfRingEtSums: {
116  return 1;
117  }
118 
119  break;
120  default: {
121  // TODO no such type, throw exception?
122  return 0;
123  }
124  break;
125  }
126 
127 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:161
const std::vector<L1GtObject>& GtCondition::objectType ( ) const
inline

get / set the trigger object type(s) in the condition

Definition at line 89 of file GtCondition.h.

References m_objectType.

Referenced by l1t::CaloCondition::CaloCondition(), EnergySumTemplate::copy(), CaloTemplate::copy(), CorrelationTemplate::copy(), and MuonTemplate::copy().

90  {
91  return m_objectType;
92  }
std::vector< L1GtObject > m_objectType
the trigger object type(s)
Definition: GtCondition.h:164
void GtCondition::print ( std::ostream &  myCout) const
virtual

print condition

Reimplemented in MuonTemplate, CaloTemplate, CorrelationTemplate, and EnergySumTemplate.

Definition at line 154 of file GtCondition.cc.

References BPTX, CenJet, CondBptx, l1t::CondCalo, CondCastor, l1t::CondCorrelation, CondEnergySum, CondExternal, CondHfBitCounts, CondHfRingEtSums, CondJetCounts, l1t::CondMuon, l1t::CondNull, ETM, ETT, ForJet, GtExternal, HfBitCounts, HfRingEtSums, HTM, HTT, i, IsoEG, JetCounts, m_condCategory, m_condChipNr, m_condGEq, m_condName, m_condRelativeBx, m_condType, m_objectType, Mu, NoIsoEG, TauJet, l1t::Type1s, l1t::Type2cor, l1t::Type2s, l1t::Type2wsc, l1t::Type3s, l1t::Type4s, TypeBptx, TypeCastor, TypeETM, TypeETT, TypeExternal, TypeHfBitCounts, TypeHfRingEtSums, TypeHTM, TypeHTT, TypeJetCounts, and l1t::TypeNull.

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

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

Definition at line 72 of file GtCondition.h.

References m_condCategory.

73  {
74  m_condCategory = cCategory;
75  }
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GtCondition.h:158
void GtCondition::setCondChipNr ( const int &  cChipNr)
inline

Definition at line 116 of file GtCondition.h.

References m_condChipNr.

Referenced by l1t::TriggerMenuXmlParser::parseEnergySum().

117  {
118  m_condChipNr = cChipNr;
119  }
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GtCondition.h:170
void GtCondition::setCondGEq ( const bool &  cGEq)
inline

Definition at line 105 of file GtCondition.h.

References m_condGEq.

Referenced by l1t::TriggerMenuXmlParser::parseEnergySum().

106  {
107  m_condGEq = cGEq;
108  }
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
Definition: GtCondition.h:167
void GtCondition::setCondName ( const std::string &  cName)
inline

Definition at line 61 of file GtCondition.h.

References m_condName.

62  {
63  m_condName = cName;
64  }
std::string m_condName
the name of the condition
Definition: GtCondition.h:155
void GtCondition::setCondRelativeBx ( const int &  cRelativeBx)
inline

Definition at line 127 of file GtCondition.h.

References m_condRelativeBx.

Referenced by l1t::TriggerMenuXmlParser::parseEnergySum().

128  {
129  m_condRelativeBx = cRelativeBx;
130  }
int m_condRelativeBx
Definition: GtCondition.h:173
void GtCondition::setCondType ( const l1t::GtConditionType cType)
inline

Definition at line 83 of file GtCondition.h.

References m_condType.

Referenced by l1t::TriggerMenuXmlParser::parseEnergySum().

84  {
85  m_condType = cType;
86  }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:161
void GtCondition::setObjectType ( const std::vector< L1GtObject > &  objType)
inline

Definition at line 94 of file GtCondition.h.

References m_objectType.

Referenced by l1t::TriggerMenuXmlParser::parseEnergySum().

95  {
96  m_objectType = objType;
97  }
std::vector< L1GtObject > m_objectType
the trigger object type(s)
Definition: GtCondition.h:164
const bool GtCondition::wsc ( ) const

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

Definition at line 131 of file GtCondition.cc.

References m_condType, and l1t::Type2wsc.

Referenced by CaloTemplate::print(), and MuonTemplate::print().

132 {
133 
134  if (m_condType == l1t::Type2wsc) {
135  return true;
136  }
137 
138  return false;
139 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GtCondition.h:161

Friends And Related Function Documentation

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

output stream operator

Definition at line 428 of file GtCondition.cc.

429 {
430  result.print(os);
431  return os;
432 
433 }
virtual void print(std::ostream &myCout) const
print condition
Definition: GtCondition.cc:154

Member Data Documentation

l1t::GtConditionCategory GtCondition::m_condCategory
protected
int GtCondition::m_condChipNr
protected
bool GtCondition::m_condGEq
protected

the operator used for the condition (>=, =): true for >=

Definition at line 167 of file GtCondition.h.

Referenced by condGEq(), EnergySumTemplate::copy(), CaloTemplate::copy(), CorrelationTemplate::copy(), MuonTemplate::copy(), print(), and setCondGEq().

std::string GtCondition::m_condName
protected
int GtCondition::m_condRelativeBx
protected
l1t::GtConditionType GtCondition::m_condType
protected
std::vector<L1GtObject> GtCondition::m_objectType
protected