CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Member Functions | 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...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
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 35 of file L1GtCondition.h.

Constructor & Destructor Documentation

◆ L1GtCondition() [1/3]

L1GtCondition::L1GtCondition ( )

constructor(s)

Definition at line 28 of file L1GtCondition.cc.

28  {
31  m_condChipNr = -1;
32  m_condGEq = false;
33 
34  // the rest of private members are C++ initialized
35 }

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

◆ L1GtCondition() [2/3]

L1GtCondition::L1GtCondition ( const std::string &  cName)

constructor from condition name

Definition at line 38 of file L1GtCondition.cc.

38  {
39  m_condName = cName;
40 
43  m_condChipNr = -1;
44 }

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

◆ L1GtCondition() [3/3]

L1GtCondition::L1GtCondition ( const std::string &  cName,
const L1GtConditionCategory cCategory,
const L1GtConditionType cType 
)

constructor from condition name, category and type

Definition at line 47 of file L1GtCondition.cc.

49  {
50  m_condName = cName;
51  m_condCategory = cCategory;
52  m_condType = cType;
53 
54  m_condChipNr = -1;
55 }

References m_condCategory, m_condChipNr, m_condName, and m_condType.

◆ ~L1GtCondition()

L1GtCondition::~L1GtCondition ( )
virtual

destructor

Definition at line 57 of file L1GtCondition.cc.

57  {
58  // empty
59 }

Member Function Documentation

◆ condCategory()

const L1GtConditionCategory& L1GtCondition::condCategory ( ) const
inline

get / set the category of the condition

Definition at line 57 of file L1GtCondition.h.

57 { return m_condCategory; }

References m_condCategory.

Referenced by L1TMenuHelper::getLUSOTrigger().

◆ condChipNr()

const int& L1GtCondition::condChipNr ( ) const
inline

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

Definition at line 77 of file L1GtCondition.h.

77 { return m_condChipNr; }

References m_condChipNr.

◆ condGEq()

const bool L1GtCondition::condGEq ( ) const
inline

◆ condName()

const std::string& L1GtCondition::condName ( ) const
inline

get / set condition name

Definition at line 52 of file L1GtCondition.h.

52 { return m_condName; }

References m_condName.

Referenced by L1TMenuHelper::getLUSOTrigger().

◆ condType()

const L1GtConditionType& L1GtCondition::condType ( ) const
inline

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

Definition at line 62 of file L1GtCondition.h.

62 { return m_condType; }

References m_condType.

Referenced by L1TMenuHelper::getLUSOTrigger().

◆ corr()

const bool L1GtCondition::corr ( ) const

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

Definition at line 124 of file L1GtCondition.cc.

124  {
125  if (m_condType == Type2cor) {
126  return true;
127  }
128 
129  return false;
130 }

References m_condType, and Type2cor.

◆ nrObjects()

const int L1GtCondition::nrObjects ( ) const

get number of trigger objects

Definition at line 62 of file L1GtCondition.cc.

62  {
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 }

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(), 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(), L1GtJetCountsTemplate::print(), L1GtEnergySumTemplate::print(), L1GtCaloTemplate::print(), and L1GtMuonTemplate::print().

◆ objectType()

const std::vector<L1GtObject>& L1GtCondition::objectType ( ) const
inline

◆ print()

void L1GtCondition::print ( std::ostream &  myCout) const
virtual

print condition

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

Definition at line 133 of file L1GtCondition.cc.

133  {
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 }

References BPTX, CenJet, CondBptx, CondCalo, CondCastor, CondCorrelation, CondEnergySum, CondExternal, CondHfBitCounts, CondHfRingEtSums, CondJetCounts, CondMuon, CondNull, ETM, ETT, ForJet, GtExternal, HfBitCounts, HfRingEtSums, HTM, HTT, mps_fire::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 L1GtCastorTemplate::print(), L1GtBptxTemplate::print(), L1GtExternalTemplate::print(), L1GtHfRingEtSumsTemplate::print(), L1GtHfBitCountsTemplate::print(), L1GtJetCountsTemplate::print(), L1GtEnergySumTemplate::print(), L1GtCaloTemplate::print(), L1GtMuonTemplate::print(), and L1GtCorrelationTemplate::print().

◆ serialize()

template<class Archive >
void L1GtCondition::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setCondCategory()

void L1GtCondition::setCondCategory ( const L1GtConditionCategory cCategory)
inline

Definition at line 59 of file L1GtCondition.h.

59 { m_condCategory = cCategory; }

References m_condCategory.

◆ setCondChipNr()

void L1GtCondition::setCondChipNr ( const int &  cChipNr)
inline

◆ setCondGEq()

void L1GtCondition::setCondGEq ( const bool &  cGEq)
inline

◆ setCondName()

void L1GtCondition::setCondName ( const std::string &  cName)
inline

Definition at line 54 of file L1GtCondition.h.

54 { m_condName = cName; }

References m_condName.

◆ setCondType()

void L1GtCondition::setCondType ( const L1GtConditionType cType)
inline

◆ setObjectType()

void L1GtCondition::setObjectType ( const std::vector< L1GtObject > &  objType)
inline

◆ wsc()

const bool L1GtCondition::wsc ( ) const

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

Definition at line 114 of file L1GtCondition.cc.

114  {
115  if (m_condType == Type2wsc) {
116  return true;
117  }
118 
119  return false;
120 }

References m_condType, and Type2wsc.

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 118 of file L1GtCondition.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 118 of file L1GtCondition.h.

◆ operator<<

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

output stream operator

Definition at line 420 of file L1GtCondition.cc.

420  {
421  result.print(os);
422  return os;
423 }

Member Data Documentation

◆ m_condCategory

L1GtConditionCategory L1GtCondition::m_condCategory
protected

◆ m_condChipNr

int L1GtCondition::m_condChipNr
protected

◆ m_condGEq

bool L1GtCondition::m_condGEq
protected

◆ m_condName

std::string L1GtCondition::m_condName
protected

◆ m_condType

L1GtConditionType L1GtCondition::m_condType
protected

◆ m_objectType

std::vector<L1GtObject> L1GtCondition::m_objectType
protected
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
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
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
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
TypeExternal
Definition: L1GtDefinitions.h:21
TauJet
Definition: L1GtObject.h:34
electrons_cff.objType
objType
Definition: electrons_cff.py:514
Type2wsc
Definition: L1GtDefinitions.h:8
TypeHfRingEtSums
Definition: L1GtDefinitions.h:19
CondCastor
Definition: L1GtDefinitions.h:33
Type3s
Definition: L1GtDefinitions.h:10
CondCalo
Definition: L1GtDefinitions.h:29
ETT
Definition: L1GtObject.h:36
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
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