CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
L1GlobalTriggerRecord Class Reference

#include <L1GlobalTriggerRecord.h>

Public Member Functions

const bool decision () const
 
const DecisionWord decisionWord () const
 
const DecisionWord decisionWordBeforeMask () const
 
const unsigned int gtPrescaleFactorIndexAlgo () const
 
const unsigned int gtPrescaleFactorIndexTech () const
 get/set index of the set of prescale factors More...
 
 L1GlobalTriggerRecord ()
 constructors More...
 
 L1GlobalTriggerRecord (const unsigned int numberPhysTriggers, const unsigned int numberTechnicalTriggers)
 
 L1GlobalTriggerRecord (const L1GlobalTriggerRecord &)
 copy constructor More...
 
bool operator!= (const L1GlobalTriggerRecord &) const
 unequal operator More...
 
L1GlobalTriggerRecordoperator= (const L1GlobalTriggerRecord &)
 assignment operator More...
 
bool operator== (const L1GlobalTriggerRecord &) const
 equal operator More...
 
void print (std::ostream &myCout) const
 pretty print the content of a L1GlobalTriggerRecord More...
 
void printGtDecision (std::ostream &myCout) const
 print global decision and algorithm decision word More...
 
void printTechnicalTrigger (std::ostream &myCout) const
 print technical triggers More...
 
void reset ()
 clear the record More...
 
void setDecision (const bool &dValue)
 
void setDecisionWord (const DecisionWord &dWordValue)
 
void setDecisionWordBeforeMask (const DecisionWord &dWordValue)
 
void setGtPrescaleFactorIndexAlgo (const unsigned int &gtPrescaleFactorIndexAlgoValue)
 
void setGtPrescaleFactorIndexTech (const unsigned int &gtPrescaleFactorIndexTechValue)
 
void setTechnicalTriggerWord (const TechnicalTriggerWord &ttWordValue)
 
void setTechnicalTriggerWordBeforeMask (const TechnicalTriggerWord &ttWordValue)
 
const TechnicalTriggerWord technicalTriggerWord () const
 
const TechnicalTriggerWord technicalTriggerWordBeforeMask () const
 
virtual ~L1GlobalTriggerRecord ()
 destructor More...
 

Private Attributes

DecisionWord m_gtDecisionWord
 algorithm decision word for L1A bunch cross More...
 
DecisionWord m_gtDecisionWordBeforeMask
 algorithm decision word for L1A bunch cross before applying the masks More...
 
bool m_gtGlobalDecision
 global decision for L1A bunch cross More...
 
unsigned int m_gtPrescaleFactorIndexAlgo
 
unsigned int m_gtPrescaleFactorIndexTech
 
TechnicalTriggerWord m_gtTechnicalTriggerWord
 technical trigger word for L1A bunch cross More...
 
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
 technical trigger word for L1A bunch cross before applying the masks More...
 

Friends

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

Detailed Description

Description: stripped-down record for L1 Global Trigger.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 33 of file L1GlobalTriggerRecord.h.

Constructor & Destructor Documentation

L1GlobalTriggerRecord::L1GlobalTriggerRecord ( )

constructors

Definition at line 26 of file L1GlobalTriggerRecord.cc.

27 {
28 
29  // empty
30 
31 }
L1GlobalTriggerRecord::L1GlobalTriggerRecord ( const unsigned int  numberPhysTriggers,
const unsigned int  numberTechnicalTriggers 
)

Definition at line 33 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

34  {
35 
36  m_gtDecisionWord.reserve(numberPhysTriggers);
37  m_gtTechnicalTriggerWord.reserve(numberTechnicalTriggers);
38 
39  m_gtDecisionWordBeforeMask.reserve(numberPhysTriggers);
40  m_gtTechnicalTriggerWordBeforeMask.reserve(numberTechnicalTriggers);
41 
42 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
L1GlobalTriggerRecord::L1GlobalTriggerRecord ( const L1GlobalTriggerRecord result)

copy constructor

Definition at line 45 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtGlobalDecision, m_gtPrescaleFactorIndexAlgo, m_gtPrescaleFactorIndexTech, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

47 {
48 
50 
53 
56 
59 
60 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
bool m_gtGlobalDecision
global decision for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexAlgo
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexTech
L1GlobalTriggerRecord::~L1GlobalTriggerRecord ( )
virtual

destructor

Definition at line 63 of file L1GlobalTriggerRecord.cc.

64 {
65 
66  // empty now
67 
68 }

Member Function Documentation

const bool L1GlobalTriggerRecord::decision ( ) const
inline

get Global Trigger decision, decision word and technical trigger word for bunch cross with L1Accept (BxInEvent = 0)

Definition at line 63 of file L1GlobalTriggerRecord.h.

Referenced by L1GtTrigReport::analyze(), and L1Filter::filter().

63  {
64  return m_gtGlobalDecision;
65  }
bool m_gtGlobalDecision
global decision for L1A bunch cross
const DecisionWord L1GlobalTriggerRecord::decisionWord ( ) const
inline

Definition at line 67 of file L1GlobalTriggerRecord.h.

Referenced by L1GtTrigReport::analyze(), and L1Filter::filter().

67  {
68  return m_gtDecisionWord;
69  }
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
const DecisionWord L1GlobalTriggerRecord::decisionWordBeforeMask ( ) const
inline

Definition at line 75 of file L1GlobalTriggerRecord.h.

Referenced by L1GtTrigReport::analyze(), and L1GtUtils::l1Results().

75  {
77  }
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
const unsigned int L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo ( ) const
inline
const unsigned int L1GlobalTriggerRecord::gtPrescaleFactorIndexTech ( ) const
inline

get/set index of the set of prescale factors

Definition at line 95 of file L1GlobalTriggerRecord.h.

Referenced by L1GtTrigReport::analyze(), L1GtUtils::l1Results(), and L1GtUtils::prescaleFactorSetIndex().

95  {
97  }
unsigned int m_gtPrescaleFactorIndexTech
bool L1GlobalTriggerRecord::operator!= ( const L1GlobalTriggerRecord result) const

unequal operator

Definition at line 132 of file L1GlobalTriggerRecord.cc.

134 {
135 
136  return !( result == *this);
137 
138 }
L1GlobalTriggerRecord & L1GlobalTriggerRecord::operator= ( const L1GlobalTriggerRecord result)

assignment operator

Definition at line 71 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtGlobalDecision, m_gtPrescaleFactorIndexAlgo, m_gtPrescaleFactorIndexTech, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

73 {
74 
75  if ( this != &result ) {
76 
78 
81 
84 
87  }
88 
89  return *this;
90 
91 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
bool m_gtGlobalDecision
global decision for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexAlgo
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexTech
bool L1GlobalTriggerRecord::operator== ( const L1GlobalTriggerRecord result) const

equal operator

Definition at line 94 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtGlobalDecision, m_gtPrescaleFactorIndexAlgo, m_gtPrescaleFactorIndexTech, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

96 {
97 
98  if (m_gtGlobalDecision != result.m_gtGlobalDecision) {
99  return false;
100  }
101 
102  if (m_gtDecisionWord != result.m_gtDecisionWord) {
103  return false;
104  }
105 
107  return false;
108  }
109 
111  return false;
112  }
113 
115  return false;
116  }
117 
119  return false;
120  }
121 
123  return false;
124  }
125 
126  // all members identical
127  return true;
128 
129 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
bool m_gtGlobalDecision
global decision for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexAlgo
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexTech
void L1GlobalTriggerRecord::print ( std::ostream &  myCout) const

pretty print the content of a L1GlobalTriggerRecord

Definition at line 304 of file L1GlobalTriggerRecord.cc.

References m_gtPrescaleFactorIndexTech, printGtDecision(), and printTechnicalTrigger().

Referenced by operator<<().

305 {
306 
307  printGtDecision(myCout);
308 
309  myCout << std::endl;
310 
311  printTechnicalTrigger(myCout);
312 
313  myCout << std::endl;
314  myCout << "\n Index of prescale factor set for technical triggers: "
315  << m_gtPrescaleFactorIndexTech << std::endl;
316  myCout << " Index of prescale factor set for algorithm triggers: "
317  << m_gtPrescaleFactorIndexTech << std::endl;
318  myCout << std::endl;
319 
320 
321 }
unsigned int m_gtPrescaleFactorIndexTech
void printTechnicalTrigger(std::ostream &myCout) const
print technical triggers
void printGtDecision(std::ostream &myCout) const
print global decision and algorithm decision word
void L1GlobalTriggerRecord::printGtDecision ( std::ostream &  myCout) const

print global decision and algorithm decision word

Definition at line 186 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtGlobalDecision, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by print().

187 {
188 
189  myCout << std::endl;
190  myCout << "\n Global decision (FinalOR): " << m_gtGlobalDecision << std::endl;
191 
192  // decision word (in 64bits words)
193  int sizeW64 = 64; // 64 bits words
194 
195  int iBit = 0;
196  int jBit = m_gtDecisionWord.size();
197  int nrDecWord = m_gtDecisionWord.size()/sizeW64;
198 
199  std::ostringstream stream64;
200 
201  std::vector<std::string> decWord;
202  decWord.reserve(nrDecWord);
203 
204  for (std::vector<bool>::const_reverse_iterator ritBit = m_gtDecisionWord.rbegin();
205  ritBit != m_gtDecisionWord.rend(); ++ritBit) {
206 
207  stream64 << (*ritBit ? '1' : '0');
208 
209  if ( (((iBit + 1)%16) == (sizeW64%16)) ) {
210  stream64 << " ";
211  }
212 
213  if ( ((iBit + 1)%sizeW64) == 0) {
214  std::string iW = stream64.str();
215  stream64.str("");
216 
217  decWord.push_back(iW);
218  }
219 
220 
221  iBit++;
222  jBit--;
223  }
224 
225  int iWord = 0;
226 
227  myCout << "\n DecisionWord after trigger mask (bitset style)";
228  for (std::vector<std::string>::reverse_iterator ritWord = decWord.rbegin();
229  ritWord != decWord.rend(); ++ritWord) {
230 
231  myCout << "\n Bits "
232  << iWord*sizeW64 + sizeW64 - 1 << " : " << iWord*sizeW64 << "\n ";
233  myCout << *ritWord;
234 
235  iWord++;
236 
237  }
238 
239 }
bool m_gtGlobalDecision
global decision for L1A bunch cross
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
void L1GlobalTriggerRecord::printTechnicalTrigger ( std::ostream &  myCout) const

print technical triggers

Definition at line 242 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWord.

Referenced by print().

243 {
244 
245  myCout << "\n Technical triggers after trigger mask (bitset style): \n " ;
246 
247  int sizeW64 = 64; // 64 bits words
248  int iBit = 0;
249 
250  for (std::vector<bool>::const_reverse_iterator ritBit = m_gtTechnicalTriggerWord.rbegin();
251  ritBit != m_gtTechnicalTriggerWord.rend(); ++ritBit) {
252 
253  myCout << (*ritBit ? '1' : '0');
254 
255  if ( (((iBit + 1)%16) == (sizeW64%16)) && (iBit != 63) ) {
256  myCout << " ";
257  }
258 
259  iBit++;
260  }
261 
262 
263 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
void L1GlobalTriggerRecord::reset ( void  )

clear the record

Definition at line 266 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtGlobalDecision, m_gtPrescaleFactorIndexAlgo, m_gtPrescaleFactorIndexTech, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

267 {
268 
269  m_gtGlobalDecision = false;
270 
271  for (std::vector<bool>::iterator itBit = m_gtDecisionWord.begin();
272  itBit != m_gtDecisionWord.end(); ++itBit) {
273 
274  *itBit = false;
275 
276  }
277  for (std::vector<bool>::iterator itBit = m_gtTechnicalTriggerWord.begin();
278  itBit != m_gtTechnicalTriggerWord.end(); ++itBit) {
279 
280  *itBit = false;
281 
282  }
283  for (std::vector<bool>::iterator itBit = m_gtDecisionWordBeforeMask.begin();
284  itBit != m_gtDecisionWordBeforeMask.end(); ++itBit) {
285 
286  *itBit = false;
287 
288  }
289 
290  for (std::vector<bool>::iterator itBit = m_gtTechnicalTriggerWordBeforeMask.begin();
291  itBit != m_gtTechnicalTriggerWordBeforeMask.end(); ++itBit) {
292 
293  *itBit = false;
294 
295  }
296 
299 
300 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
bool m_gtGlobalDecision
global decision for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexAlgo
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
unsigned int m_gtPrescaleFactorIndexTech
void L1GlobalTriggerRecord::setDecision ( const bool &  dValue)

set global decision, decision word and technical trigger word for bunch cross with L1Accept (BxInEvent = 0)

Definition at line 143 of file L1GlobalTriggerRecord.cc.

References m_gtGlobalDecision.

144 {
145 
146  m_gtGlobalDecision = dValue;
147 
148 }
bool m_gtGlobalDecision
global decision for L1A bunch cross
void L1GlobalTriggerRecord::setDecisionWord ( const DecisionWord dWordValue)

Definition at line 151 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord.

153 {
154 
155  m_gtDecisionWord = dWordValue;
156 
157 }
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
void L1GlobalTriggerRecord::setDecisionWordBeforeMask ( const DecisionWord dWordValue)

Definition at line 168 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWordBeforeMask.

170 {
171 
172  m_gtDecisionWordBeforeMask = dWordValue;
173 
174 }
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
void L1GlobalTriggerRecord::setGtPrescaleFactorIndexAlgo ( const unsigned int &  gtPrescaleFactorIndexAlgoValue)
inline

Definition at line 108 of file L1GlobalTriggerRecord.h.

References edm::operator<<(), edm::print(), and reset().

109  {
110  m_gtPrescaleFactorIndexAlgo = gtPrescaleFactorIndexAlgoValue;
111  }
unsigned int m_gtPrescaleFactorIndexAlgo
void L1GlobalTriggerRecord::setGtPrescaleFactorIndexTech ( const unsigned int &  gtPrescaleFactorIndexTechValue)
inline

Definition at line 99 of file L1GlobalTriggerRecord.h.

100  {
101  m_gtPrescaleFactorIndexTech = gtPrescaleFactorIndexTechValue;
102  }
unsigned int m_gtPrescaleFactorIndexTech
void L1GlobalTriggerRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue)

Definition at line 159 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWord.

161 {
162 
163  m_gtTechnicalTriggerWord = ttWordValue;
164 
165 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
void L1GlobalTriggerRecord::setTechnicalTriggerWordBeforeMask ( const TechnicalTriggerWord ttWordValue)

Definition at line 176 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWordBeforeMask.

178 {
179 
181 
182 }
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
const TechnicalTriggerWord L1GlobalTriggerRecord::technicalTriggerWord ( ) const
inline

Definition at line 71 of file L1GlobalTriggerRecord.h.

Referenced by L1GtTrigReport::analyze().

71  {
73  }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
const TechnicalTriggerWord L1GlobalTriggerRecord::technicalTriggerWordBeforeMask ( ) const
inline

Definition at line 79 of file L1GlobalTriggerRecord.h.

Referenced by L1GtTrigReport::analyze(), and L1GtUtils::l1Results().

79  {
81  }
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  streamRec,
const L1GlobalTriggerRecord result 
)
friend

output stream operator

Definition at line 324 of file L1GlobalTriggerRecord.cc.

325 {
326  result.print(streamRec);
327  return streamRec;
328 
329 }
void print(std::ostream &myCout) const
pretty print the content of a L1GlobalTriggerRecord

Member Data Documentation

DecisionWord L1GlobalTriggerRecord::m_gtDecisionWord
private

algorithm decision word for L1A bunch cross

Definition at line 137 of file L1GlobalTriggerRecord.h.

Referenced by L1GlobalTriggerRecord(), operator=(), operator==(), printGtDecision(), reset(), and setDecisionWord().

DecisionWord L1GlobalTriggerRecord::m_gtDecisionWordBeforeMask
private

algorithm decision word for L1A bunch cross before applying the masks

Definition at line 143 of file L1GlobalTriggerRecord.h.

Referenced by L1GlobalTriggerRecord(), operator=(), operator==(), reset(), and setDecisionWordBeforeMask().

bool L1GlobalTriggerRecord::m_gtGlobalDecision
private

global decision for L1A bunch cross

Definition at line 134 of file L1GlobalTriggerRecord.h.

Referenced by L1GlobalTriggerRecord(), operator=(), operator==(), printGtDecision(), reset(), and setDecision().

unsigned int L1GlobalTriggerRecord::m_gtPrescaleFactorIndexAlgo
private

Definition at line 151 of file L1GlobalTriggerRecord.h.

Referenced by L1GlobalTriggerRecord(), operator=(), operator==(), and reset().

unsigned int L1GlobalTriggerRecord::m_gtPrescaleFactorIndexTech
private

index of the set of prescale factors in the DB/EventSetup for algorithm triggers and technical triggers

Definition at line 150 of file L1GlobalTriggerRecord.h.

Referenced by L1GlobalTriggerRecord(), operator=(), operator==(), print(), and reset().

TechnicalTriggerWord L1GlobalTriggerRecord::m_gtTechnicalTriggerWord
private

technical trigger word for L1A bunch cross

Definition at line 140 of file L1GlobalTriggerRecord.h.

Referenced by L1GlobalTriggerRecord(), operator=(), operator==(), printTechnicalTrigger(), reset(), and setTechnicalTriggerWord().

TechnicalTriggerWord L1GlobalTriggerRecord::m_gtTechnicalTriggerWordBeforeMask
private

technical trigger word for L1A bunch cross before applying the masks

Definition at line 146 of file L1GlobalTriggerRecord.h.

Referenced by L1GlobalTriggerRecord(), operator=(), operator==(), reset(), and setTechnicalTriggerWordBeforeMask().