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

#include <GlobalCondition.h>

Inheritance diagram for GlobalCondition:
CaloTemplate CorrelationTemplate 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< 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< 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< 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
: 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.

Referenced by ExternalTemplate::copy(), EnergySumTemplate::copy(), CaloTemplate::copy(), MuonTemplate::copy(), and CorrelationTemplate::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.

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

113  {
114  return m_condChipNr;
115  }
int m_condChipNr
condition is located on condition chip m_condChipNr
const bool GlobalCondition::condGEq ( ) const
inline

get / set condition GEq flag

Definition at line 101 of file GlobalCondition.h.

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

102  {
103  return m_condGEq;
104  }
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
const std::string& GlobalCondition::condName ( ) const
inline

get / set condition name

Definition at line 57 of file GlobalCondition.h.

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

58  {
59  return m_condName;
60  }
std::string m_condName
the name of the condition
const int& GlobalCondition::condRelativeBx ( ) const
inline

get / set the condition relative bx

Definition at line 123 of file GlobalCondition.h.

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

124  {
125  return m_condRelativeBx;
126  }
const l1t::GtConditionType& GlobalCondition::condType ( ) const
inline

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

Definition at line 79 of file GlobalCondition.h.

Referenced by ExternalTemplate::copy(), EnergySumTemplate::copy(), CaloTemplate::copy(), MuonTemplate::copy(), and CorrelationTemplate::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 141 of file GlobalCondition.cc.

References m_condType, and l1t::Type2cor.

142 {
143 
144  if (m_condType == l1t::Type2cor) {
145  return true;
146  }
147 
148  return false;
149 }
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::Type2s, l1t::Type2wsc, l1t::Type3s, l1t::Type4s, l1t::TypeETM, l1t::TypeETM2, l1t::TypeETT, l1t::TypeExternal, l1t::TypeHTM, l1t::TypeHTT, l1t::TypeMinBias, and l1t::TypeNull.

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

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;
98  case l1t::Type3s: {
99  return 3;
100  }
101 
102  break;
103  case l1t::Type4s: {
104  return 4;
105  }
106 
107  break;
108  case l1t::TypeETT:
109  case l1t::TypeETM:
110  case l1t::TypeHTT:
111  case l1t::TypeHTM:
112  case l1t::TypeETM2:
113  case l1t::TypeMinBias: {
114  return 1;
115  }
116 
117  break;
118  default: {
119  // TODO no such type, throw exception?
120  return 0;
121  }
122  break;
123  }
124 
125 }
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
const std::vector<GlobalObject>& GlobalCondition::objectType ( ) const
inline

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

Definition at line 90 of file GlobalCondition.h.

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

91  {
92  return m_objectType;
93  }
std::vector< GlobalObject > m_objectType
the trigger object type(s)
void GlobalCondition::print ( std::ostream &  myCout) const
virtual

print condition

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

Definition at line 152 of file GlobalCondition.cc.

References l1t::CondCalo, l1t::CondCorrelation, l1t::CondEnergySum, l1t::CondExternal, l1t::CondMuon, l1t::CondNull, l1t::gtEG, l1t::gtETM, l1t::gtETM2, l1t::gtETT, l1t::gtExternal, l1t::gtHTM, l1t::gtHTT, l1t::gtJet, l1t::gtMinBias, l1t::gtMu, l1t::gtTau, i, m_condCategory, m_condChipNr, m_condGEq, m_condName, m_condRelativeBx, m_condType, m_objectType, l1t::Type1s, l1t::Type2cor, l1t::Type2s, l1t::Type2wsc, l1t::Type3s, l1t::Type4s, l1t::TypeETM, l1t::TypeETM2, l1t::TypeETT, l1t::TypeExternal, l1t::TypeHTM, l1t::TypeHTT, l1t::TypeMinBias, and l1t::TypeNull.

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

153 {
154 
155  myCout << "\n Condition name: " << m_condName << std::endl;
156 
157  switch (m_condCategory) {
158  case l1t::CondNull: {
159  myCout << " Condition category: " << "l1t::CondNull"
160  << " - it means not defined!"
161  << std::endl;
162  }
163 
164  break;
165  case l1t::CondMuon: {
166  myCout << " Condition category: " << "l1t::CondMuon" << std::endl;
167  }
168 
169  break;
170  case l1t::CondCalo: {
171  myCout << " Condition category: " << "l1t::CondCalo" << std::endl;
172  }
173 
174  break;
175  case l1t::CondEnergySum: {
176  myCout << " Condition category: " << "CondEnergySum" << std::endl;
177  }
178 
179  break;
180  case l1t::CondCorrelation: {
181  myCout << " Condition category: " << "CondCorrelation" << std::endl;
182  }
183 
184  break;
185  case l1t::CondExternal: {
186  myCout << " Condition category: " << "CondExternal" << std::endl;
187  }
188 
189  break;
190  default: {
191  myCout << " Condition category: " << m_condCategory
192  << " - no such category defined. Check l1t::GtConditionCategory enum."
193  << std::endl;
194 
195  }
196  break;
197  }
198 
199  switch (m_condType) {
200 
201  case l1t::TypeNull: {
202  myCout << " Condition type: " << "l1t::TypeNull"
203  << " - it means not defined!"
204  << std::endl;
205  }
206 
207  break;
208  case l1t::Type1s: {
209  myCout << " Condition type: " << "l1t::Type1s" << std::endl;
210  }
211 
212  break;
213  case l1t::Type2s: {
214  myCout << " Condition type: " << "l1t::Type2s" << std::endl;
215  }
216 
217  break;
218  case l1t::Type2wsc: {
219  myCout << " Condition type: " << "l1t::Type2wsc" << std::endl;
220  }
221 
222  break;
223  case l1t::Type2cor: {
224  myCout << " Condition type: " << "l1t::Type2cor" << std::endl;
225  }
226 
227  break;
228  case l1t::Type3s: {
229  myCout << " Condition type: " << "l1t::Type3s" << std::endl;
230  }
231 
232  break;
233  case l1t::Type4s: {
234  myCout << " Condition type: " << "l1t::Type4s" << std::endl;
235  }
236 
237  break;
238  case l1t::TypeETM: {
239  myCout << " Condition type: " << "TypeETM" << std::endl;
240  }
241 
242  break;
243  case l1t::TypeETT: {
244  myCout << " Condition type: " << "TypeETT" << std::endl;
245  }
246 
247  break;
248  case l1t::TypeHTT: {
249  myCout << " Condition type: " << "TypeHTT" << std::endl;
250  }
251 
252  break;
253  case l1t::TypeHTM: {
254  myCout << " Condition type: " << "TypeHTM" << std::endl;
255  }
256 
257  case l1t::TypeETM2: {
258  myCout << " Condition type: " << "TypeETM2" << std::endl;
259  }
260 
261  case l1t::TypeMinBias: {
262  myCout << " Condition type: " << "TypeMinBias" << std::endl;
263  }
264 
265  break;
266  case l1t::TypeExternal: {
267  myCout << " Condition type: " << "TypeExternal" << std::endl;
268  }
269 
270  break;
271  default: {
272  myCout << " Condition type: " << m_condType
273  << " - no such type defined. Check l1t::GtConditionType enum."
274  << std::endl;
275  }
276  break;
277  }
278 
279 
280  myCout << " Object types: ";
281 
282  for (unsigned int i = 0; i < m_objectType.size(); ++i) {
283 
284  switch (m_objectType[i]) {
285  case l1t::gtMu: {
286  myCout << " Mu ";
287  }
288 
289  break;
290  case l1t::gtEG: {
291  myCout << " EG ";
292  }
293 
294  break;
295 
296  case l1t::gtJet: {
297  myCout << " Jet ";
298  }
299 
300  break;
301 
302  case l1t::gtTau: {
303  myCout << " Tau ";
304  }
305 
306  break;
307  case l1t::gtETM: {
308  myCout << " ETM ";
309  }
310 
311  break;
312  case l1t::gtETT: {
313  myCout << " ETT ";
314  }
315 
316  break;
317  case l1t::gtHTT: {
318  myCout << " HTT ";
319  }
320 
321  break;
322  case l1t::gtHTM: {
323  myCout << " HTM ";
324  }
325 
326  break;
327 
328  case l1t::gtETM2: {
329  myCout << " ETM2 ";
330  }
331 
332  case l1t::gtMinBias: {
333  myCout << " MinBias ";
334  }
335 
336 
337  case l1t::gtExternal: {
338  myCout << " External ";
339  }
340 
341  break;
342  default: {
343  myCout << " Unknown type " << m_objectType[i];
344  }
345  break;
346  }
347  }
348 
349  myCout << std::endl;
350 
351  myCout << " \" >= \" flag: " << m_condGEq << std::endl;
352 
353  myCout << " Condition chip: " << m_condChipNr;
354 
355  if (m_condChipNr < 0) {
356  myCout << " - not properly initialized! ";
357  }
358 
359  myCout << std::endl;
360 
361  myCout << " Relative BX: " << m_condRelativeBx << std::endl;
362 
363 }
int i
Definition: DBlmapReader.cc:9
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
std::vector< GlobalObject > m_objectType
the trigger object type(s)
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)
void GlobalCondition::setCondCategory ( const l1t::GtConditionCategory cCategory)
inline

Definition at line 73 of file GlobalCondition.h.

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.

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< 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 129 of file GlobalCondition.cc.

References m_condType, and l1t::Type2wsc.

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

130 {
131 
132  if (m_condType == l1t::Type2wsc) {
133  return true;
134  }
135 
136  return false;
137 }
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 366 of file GlobalCondition.cc.

367 {
368  result.print(os);
369  return os;
370 
371 }
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

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

Definition at line 168 of file GlobalCondition.h.

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

std::string GlobalCondition::m_condName
protected
int GlobalCondition::m_condRelativeBx
protected
l1t::GtConditionType GlobalCondition::m_condType
protected
std::vector<GlobalObject> GlobalCondition::m_objectType
protected