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::L1GtCondition ( )

constructor(s)

Definition at line 28 of file L1GtCondition.cc.

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

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

constructor from condition name

Definition at line 40 of file L1GtCondition.cc.

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

41 {
42  m_condName = cName;
43 
46  m_condChipNr = -1;
47 }
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 50 of file L1GtCondition.cc.

References m_condCategory, m_condChipNr, m_condName, and m_condType.

53 {
54 
55  m_condName = cName;
56  m_condCategory = cCategory;
57  m_condType = cType;
58 
59  m_condChipNr = -1;
60 
61 }
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 65 of file L1GtCondition.cc.

66 {
67  // empty
68 }

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 112 of file L1GtCondition.h.

References m_condChipNr.

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

113  {
114  return m_condChipNr;
115  }
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 140 of file L1GtCondition.cc.

References m_condType, and Type2cor.

Referenced by setCondChipNr().

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

get number of trigger objects

Definition at line 71 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(), L1GtJetCountsTemplate::print(), L1GtEnergySumTemplate::print(), L1GtCaloTemplate::print(), L1GtMuonTemplate::print(), and setCondChipNr().

72 {
73 
74  switch (m_condType) {
75 
76  case TypeNull:
77  case TypeExternal:
78  case TypeCastor:
79  case TypeBptx: {
80  return 0;
81  }
82 
83  break;
84  case Type1s: {
85  return 1;
86  }
87 
88  break;
89  case Type2s:
90  case Type2wsc:
91  case Type2cor: {
92  return 2;
93  }
94 
95  break;
96  case Type3s: {
97  return 3;
98  }
99 
100  break;
101  case Type4s: {
102  return 4;
103  }
104 
105  break;
106  case TypeETT:
107  case TypeETM:
108  case TypeHTT:
109  case TypeHTM:
110  case TypeJetCounts:
111  case TypeHfBitCounts:
112  case TypeHfRingEtSums: {
113  return 1;
114  }
115 
116  break;
117  default: {
118  // TODO no such type, throw exception?
119  return 0;
120  }
121  break;
122  }
123 
124 }
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, L1GtEnergySumTemplate, L1GtJetCountsTemplate, L1GtHfBitCountsTemplate, L1GtHfRingEtSumsTemplate, L1GtBptxTemplate, L1GtExternalTemplate, and L1GtCastorTemplate.

Definition at line 151 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, 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 operator<<(), L1GtCastorTemplate::print(), L1GtExternalTemplate::print(), L1GtBptxTemplate::print(), L1GtHfBitCountsTemplate::print(), L1GtHfRingEtSumsTemplate::print(), L1GtJetCountsTemplate::print(), L1GtEnergySumTemplate::print(), L1GtCaloTemplate::print(), L1GtMuonTemplate::print(), L1GtCorrelationTemplate::print(), and setCondChipNr().

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

Definition at line 73 of file L1GtCondition.h.

References m_condCategory.

74  {
75  m_condCategory = cCategory;
76  }
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 62 of file L1GtCondition.h.

References m_condName.

63  {
64  m_condName = cName;
65  }
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 128 of file L1GtCondition.cc.

References m_condType, and Type2wsc.

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

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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 163 of file L1GtCondition.h.

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

Definition at line 163 of file L1GtCondition.h.

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

output stream operator

Definition at line 423 of file L1GtCondition.cc.

Referenced by setCondChipNr().

424 {
425  result.print(os);
426  return os;
427 
428 }
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