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
L1GtCondition Class Reference

#include <L1GtCondition.h>

Inheritance diagram for L1GtCondition:
L1GtBptxTemplate L1GtCaloTemplate L1GtCastorTemplate L1GtCorrelationTemplate L1GtEnergySumTemplate L1GtExternalTemplate L1GtHfBitCountsTemplate L1GtHfRingEtSumsTemplate L1GtJetCountsTemplate L1GtMuonTemplate

Public Member Functions

const L1GtConditionCategorycondCategory () 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 L1GtConditionTypecondType () const
 get / set the type of the condition (1s, etc) More...
 
const bool corr () const
 
 L1GtCondition ()
 
 L1GtCondition (const std::string &)
 constructor from condition name More...
 
 L1GtCondition (const std::string &, const L1GtConditionCategory &, const L1GtConditionType &)
 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 L1GtConditionCategory &cCategory)
 
void setCondChipNr (const int &cChipNr)
 
void setCondGEq (const bool &cGEq)
 
void setCondName (const std::string &cName)
 
void setCondType (const L1GtConditionType &cType)
 
void setObjectType (const std::vector< L1GtObject > &objType)
 
const bool wsc () const
 
virtual ~L1GtCondition ()
 destructor More...
 

Protected Attributes

L1GtConditionCategory 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...
 
L1GtConditionType 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 L1GtCondition &)
 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 33 of file L1GtCondition.h.

Constructor & Destructor Documentation

L1GtCondition::L1GtCondition ( )

constructor(s)

Definition at line 28 of file L1GtCondition.cc.

References CondNull, m_condCategory, m_condChipNr, m_condType, and TypeNull.

29 {
30 
33  m_condChipNr = -1;
34 
35  // the rest of private members are C++ initialized
36 }
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
L1GtCondition::L1GtCondition ( const std::string &  cName)

constructor from condition name

Definition at line 39 of file L1GtCondition.cc.

References CondNull, m_condCategory, m_condChipNr, m_condName, m_condType, and TypeNull.

40 {
41  m_condName = cName;
42 
45  m_condChipNr = -1;
46 }
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
L1GtCondition::L1GtCondition ( const std::string &  cName,
const L1GtConditionCategory cCategory,
const L1GtConditionType cType 
)

constructor from condition name, category and type

Definition at line 49 of file L1GtCondition.cc.

References m_condCategory, m_condChipNr, m_condName, and m_condType.

52 {
53 
54  m_condName = cName;
55  m_condCategory = cCategory;
56  m_condType = cType;
57 
58  m_condChipNr = -1;
59 
60 }
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
L1GtCondition::~L1GtCondition ( )
virtual

destructor

Definition at line 64 of file L1GtCondition.cc.

65 {
66  // empty
67 }

Member Function Documentation

const L1GtConditionCategory& L1GtCondition::condCategory ( ) const
inline
const int& L1GtCondition::condChipNr ( ) const
inline

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

Definition at line 110 of file L1GtCondition.h.

References m_condChipNr.

Referenced by L1GtCastorTemplate::copy(), L1GtBptxTemplate::copy(), L1GtExternalTemplate::copy(), L1GtHfRingEtSumsTemplate::copy(), L1GtHfBitCountsTemplate::copy(), L1GtEnergySumTemplate::copy(), L1GtJetCountsTemplate::copy(), L1GtCaloTemplate::copy(), L1GtMuonTemplate::copy(), and L1GtCorrelationTemplate::copy().

111  {
112  return m_condChipNr;
113  }
int m_condChipNr
condition is located on condition chip m_condChipNr
const bool L1GtCondition::condGEq ( ) const
inline
const std::string& L1GtCondition::condName ( ) const
inline
const L1GtConditionType& L1GtCondition::condType ( ) const
inline
const bool L1GtCondition::corr ( ) const

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

Definition at line 139 of file L1GtCondition.cc.

References m_condType, and Type2cor.

140 {
141 
142  if (m_condType == Type2cor) {
143  return true;
144  }
145 
146  return false;
147 }
L1GtConditionType m_condType
the type of the condition (1s, etc)
const int L1GtCondition::nrObjects ( ) const

get number of trigger objects

Definition at line 70 of file L1GtCondition.cc.

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

Referenced by L1GtTriggerMenuConfigOnlineProd::addCaloCondition(), L1GtTriggerMenuConfigOnlineProd::addMuonCondition(), L1GtMuonCondition::checkObjectParameter(), L1GtCaloCondition::checkObjectParameter(), L1GtMuonCondition::evaluateCondition(), L1GtCaloCondition::evaluateCondition(), L1GtVhdlWriterCore::getCondChipVhdContentFromTriggerMenu(), L1TMenuHelper::getLUSOTrigger(), L1GtBptxTemplate::L1GtBptxTemplate(), L1GtCaloTemplate::L1GtCaloTemplate(), L1GtCastorTemplate::L1GtCastorTemplate(), L1GtCorrelationTemplate::L1GtCorrelationTemplate(), L1GtEnergySumTemplate::L1GtEnergySumTemplate(), L1GtExternalTemplate::L1GtExternalTemplate(), L1GtHfBitCountsTemplate::L1GtHfBitCountsTemplate(), L1GtHfRingEtSumsTemplate::L1GtHfRingEtSumsTemplate(), L1GtJetCountsTemplate::L1GtJetCountsTemplate(), L1GtMuonTemplate::L1GtMuonTemplate(), L1GtHfBitCountsTemplate::print(), L1GtHfRingEtSumsTemplate::print(), L1GtEnergySumTemplate::print(), L1GtJetCountsTemplate::print(), L1GtCaloTemplate::print(), and L1GtMuonTemplate::print().

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

print condition

Reimplemented in L1GtCorrelationTemplate, L1GtMuonTemplate, L1GtCaloTemplate, L1GtJetCountsTemplate, L1GtEnergySumTemplate, L1GtHfBitCountsTemplate, L1GtHfRingEtSumsTemplate, L1GtBptxTemplate, L1GtExternalTemplate, and L1GtCastorTemplate.

Definition at line 150 of file L1GtCondition.cc.

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

Referenced by operator<<(), L1GtCastorTemplate::print(), L1GtBptxTemplate::print(), L1GtExternalTemplate::print(), L1GtHfBitCountsTemplate::print(), L1GtHfRingEtSumsTemplate::print(), L1GtEnergySumTemplate::print(), L1GtJetCountsTemplate::print(), L1GtCaloTemplate::print(), L1GtMuonTemplate::print(), and L1GtCorrelationTemplate::print().

151 {
152 
153  myCout << "\n Condition name: " << m_condName << std::endl;
154 
155  switch (m_condCategory) {
156  case CondNull: {
157  myCout << " Condition category: " << "CondNull"
158  << " - it means not defined!"
159  << std::endl;
160  }
161 
162  break;
163  case CondMuon: {
164  myCout << " Condition category: " << "CondMuon" << std::endl;
165  }
166 
167  break;
168  case CondCalo: {
169  myCout << " Condition category: " << "CondCalo" << std::endl;
170  }
171 
172  break;
173  case CondEnergySum: {
174  myCout << " Condition category: " << "CondEnergySum" << std::endl;
175  }
176 
177  break;
178  case CondJetCounts: {
179  myCout << " Condition category: " << "CondJetCounts" << std::endl;
180  }
181 
182  break;
183  case CondCorrelation: {
184  myCout << " Condition category: " << "CondCorrelation" << std::endl;
185  }
186 
187  break;
188  case CondCastor: {
189  myCout << " Condition category: " << "CondCastor" << std::endl;
190  }
191 
192  break;
193  case CondHfBitCounts: {
194  myCout << " Condition category: " << "CondHfBitCounts" << std::endl;
195  }
196 
197  break;
198  case CondHfRingEtSums: {
199  myCout << " Condition category: " << "CondHfRingEtSums" << std::endl;
200  }
201 
202  break;
203  case CondBptx: {
204  myCout << " Condition category: " << "CondBptx" << std::endl;
205  }
206 
207  break;
208  case CondExternal: {
209  myCout << " Condition category: " << "CondExternal" << std::endl;
210  }
211 
212  break;
213  default: {
214  myCout << " Condition category: " << m_condCategory
215  << " - no such category defined. Check L1GtConditionCategory enum."
216  << std::endl;
217 
218  }
219  break;
220  }
221 
222  switch (m_condType) {
223 
224  case TypeNull: {
225  myCout << " Condition type: " << "TypeNull"
226  << " - it means not defined!"
227  << std::endl;
228  }
229 
230  break;
231  case Type1s: {
232  myCout << " Condition type: " << "Type1s" << std::endl;
233  }
234 
235  break;
236  case Type2s: {
237  myCout << " Condition type: " << "Type2s" << std::endl;
238  }
239 
240  break;
241  case Type2wsc: {
242  myCout << " Condition type: " << "Type2wsc" << std::endl;
243  }
244 
245  break;
246  case Type2cor: {
247  myCout << " Condition type: " << "Type2cor" << std::endl;
248  }
249 
250  break;
251  case Type3s: {
252  myCout << " Condition type: " << "Type3s" << std::endl;
253  }
254 
255  break;
256  case Type4s: {
257  myCout << " Condition type: " << "Type4s" << std::endl;
258  }
259 
260  break;
261  case TypeETM: {
262  myCout << " Condition type: " << "TypeETM" << std::endl;
263  }
264 
265  break;
266  case TypeETT: {
267  myCout << " Condition type: " << "TypeETT" << std::endl;
268  }
269 
270  break;
271  case TypeHTT: {
272  myCout << " Condition type: " << "TypeHTT" << std::endl;
273  }
274 
275  break;
276  case TypeHTM: {
277  myCout << " Condition type: " << "TypeHTM" << std::endl;
278  }
279 
280  break;
281  case TypeJetCounts: {
282  myCout << " Condition type: " << "TypeJetCounts" << std::endl;
283  }
284 
285  break;
286  case TypeCastor: {
287  myCout << " Condition type: " << "TypeCastor" << std::endl;
288  }
289 
290  break;
291  case TypeHfBitCounts: {
292  myCout << " Condition type: " << "TypeHfBitCounts" << std::endl;
293  }
294 
295  break;
296  case TypeHfRingEtSums: {
297  myCout << " Condition type: " << "TypeHfRingEtSums" << std::endl;
298  }
299 
300  break;
301  case TypeBptx: {
302  myCout << " Condition type: " << "TypeBptx" << std::endl;
303  }
304 
305  break;
306  case TypeExternal: {
307  myCout << " Condition type: " << "TypeExternal" << std::endl;
308  }
309 
310  break;
311  default: {
312  myCout << " Condition type: " << m_condType
313  << " - no such type defined. Check L1GtConditionType enum."
314  << std::endl;
315  }
316  break;
317  }
318 
319 
320  myCout << " Object types: ";
321 
322  for (unsigned int i = 0; i < m_objectType.size(); ++i) {
323 
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  }
403  break;
404  }
405  }
406 
407  myCout << std::endl;
408 
409  myCout << " \" >= \" flag: " << m_condGEq << std::endl;
410 
411  myCout << " Condition chip: " << m_condChipNr;
412 
413  if (m_condChipNr < 0) {
414  myCout << " - not properly initialized! ";
415  }
416 
417  myCout << std::endl;
418 
419 }
int i
Definition: DBlmapReader.cc:9
Definition: L1GtObject.h:41
Definition: L1GtObject.h:38
std::vector< L1GtObject > m_objectType
the trigger object type(s)
Definition: L1GtObject.h:40
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
std::string m_condName
the name of the condition
Definition: L1GtObject.h:32
Definition: L1GtObject.h:39
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
int m_condChipNr
condition is located on condition chip m_condChipNr
void L1GtCondition::setCondCategory ( const L1GtConditionCategory cCategory)
inline

Definition at line 71 of file L1GtCondition.h.

References m_condCategory.

72  {
73  m_condCategory = cCategory;
74  }
L1GtConditionCategory m_condCategory
the category of the condition
void L1GtCondition::setCondChipNr ( const int &  cChipNr)
inline
void L1GtCondition::setCondGEq ( const bool &  cGEq)
inline
void L1GtCondition::setCondName ( const std::string &  cName)
inline

Definition at line 60 of file L1GtCondition.h.

References m_condName.

61  {
62  m_condName = cName;
63  }
std::string m_condName
the name of the condition
void L1GtCondition::setCondType ( const L1GtConditionType cType)
inline
void L1GtCondition::setObjectType ( const std::vector< L1GtObject > &  objType)
inline
const bool L1GtCondition::wsc ( ) const

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

Definition at line 127 of file L1GtCondition.cc.

References m_condType, and Type2wsc.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCaloCondition(), L1GtTriggerMenuConfigOnlineProd::addMuonCondition(), L1GtMuonCondition::evaluateCondition(), L1GtCaloCondition::evaluateCondition(), L1GtCaloTemplate::print(), and L1GtMuonTemplate::print().

128 {
129 
130  if (m_condType == Type2wsc) {
131  return true;
132  }
133 
134  return false;
135 }
L1GtConditionType m_condType
the type of the condition (1s, etc)

Friends And Related Function Documentation

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

output stream operator

Definition at line 422 of file L1GtCondition.cc.

423 {
424  result.print(os);
425  return os;
426 
427 }
virtual void print(std::ostream &myCout) const
print condition

Member Data Documentation

L1GtConditionCategory L1GtCondition::m_condCategory
protected
int L1GtCondition::m_condChipNr
protected
bool L1GtCondition::m_condGEq
protected
std::string L1GtCondition::m_condName
protected
L1GtConditionType L1GtCondition::m_condType
protected
std::vector<L1GtObject> L1GtCondition::m_objectType
protected