CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 25 of file L1GlobalTriggerRecord.cc.

25  {
26  // empty
27 }
L1GlobalTriggerRecord::L1GlobalTriggerRecord ( const unsigned int  numberPhysTriggers,
const unsigned int  numberTechnicalTriggers 
)

Definition at line 29 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

30  {
31  m_gtDecisionWord.reserve(numberPhysTriggers);
32  m_gtTechnicalTriggerWord.reserve(numberTechnicalTriggers);
33 
34  m_gtDecisionWordBeforeMask.reserve(numberPhysTriggers);
35  m_gtTechnicalTriggerWordBeforeMask.reserve(numberTechnicalTriggers);
36 }
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 39 of file L1GlobalTriggerRecord.cc.

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

39  {
41 
44 
47 
50 }
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 53 of file L1GlobalTriggerRecord.cc.

53  {
54  // empty now
55 }

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 58 of file L1GlobalTriggerRecord.h.

References m_gtGlobalDecision.

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

Definition at line 60 of file L1GlobalTriggerRecord.h.

References m_gtDecisionWord.

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

Definition at line 64 of file L1GlobalTriggerRecord.h.

References m_gtDecisionWordBeforeMask.

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

Definition at line 87 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexAlgo.

unsigned int m_gtPrescaleFactorIndexAlgo
const unsigned int L1GlobalTriggerRecord::gtPrescaleFactorIndexTech ( ) const
inline

get/set index of the set of prescale factors

Definition at line 81 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexTech.

unsigned int m_gtPrescaleFactorIndexTech
bool L1GlobalTriggerRecord::operator!= ( const L1GlobalTriggerRecord result) const

unequal operator

Definition at line 110 of file L1GlobalTriggerRecord.cc.

110 { return !(result == *this); }
L1GlobalTriggerRecord & L1GlobalTriggerRecord::operator= ( const L1GlobalTriggerRecord result)

assignment operator

Definition at line 58 of file L1GlobalTriggerRecord.cc.

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

58  {
59  if (this != &result) {
61 
64 
67 
70  }
71 
72  return *this;
73 }
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 76 of file L1GlobalTriggerRecord.cc.

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

76  {
77  if (m_gtGlobalDecision != result.m_gtGlobalDecision) {
78  return false;
79  }
80 
81  if (m_gtDecisionWord != result.m_gtDecisionWord) {
82  return false;
83  }
84 
86  return false;
87  }
88 
90  return false;
91  }
92 
94  return false;
95  }
96 
98  return false;
99  }
100 
102  return false;
103  }
104 
105  // all members identical
106  return true;
107 }
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 227 of file L1GlobalTriggerRecord.cc.

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

Referenced by operator<<().

227  {
228  printGtDecision(myCout);
229 
230  myCout << std::endl;
231 
232  printTechnicalTrigger(myCout);
233 
234  myCout << std::endl;
235  myCout << "\n Index of prescale factor set for technical triggers: " << m_gtPrescaleFactorIndexTech << std::endl;
236  myCout << " Index of prescale factor set for algorithm triggers: " << m_gtPrescaleFactorIndexTech << std::endl;
237  myCout << std::endl;
238 }
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 133 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtGlobalDecision, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by print().

133  {
134  myCout << std::endl;
135  myCout << "\n Global decision (FinalOR): " << m_gtGlobalDecision << std::endl;
136 
137  // decision word (in 64bits words)
138  int sizeW64 = 64; // 64 bits words
139 
140  int iBit = 0;
141  int jBit = m_gtDecisionWord.size();
142  int nrDecWord = m_gtDecisionWord.size() / sizeW64;
143 
144  std::ostringstream stream64;
145 
146  std::vector<std::string> decWord;
147  decWord.reserve(nrDecWord);
148 
149  for (std::vector<bool>::const_reverse_iterator ritBit = m_gtDecisionWord.rbegin(); ritBit != m_gtDecisionWord.rend();
150  ++ritBit) {
151  stream64 << (*ritBit ? '1' : '0');
152 
153  if ((((iBit + 1) % 16) == (sizeW64 % 16))) {
154  stream64 << " ";
155  }
156 
157  if (((iBit + 1) % sizeW64) == 0) {
158  std::string iW = stream64.str();
159  stream64.str("");
160 
161  decWord.push_back(iW);
162  }
163 
164  iBit++;
165  jBit--;
166  }
167 
168  int iWord = 0;
169 
170  myCout << "\n DecisionWord after trigger mask (bitset style)";
171  for (std::vector<std::string>::reverse_iterator ritWord = decWord.rbegin(); ritWord != decWord.rend(); ++ritWord) {
172  myCout << "\n Bits " << iWord * sizeW64 + sizeW64 - 1 << " : " << iWord * sizeW64 << "\n ";
173  myCout << *ritWord;
174 
175  iWord++;
176  }
177 }
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 180 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWord.

Referenced by print().

180  {
181  myCout << "\n Technical triggers after trigger mask (bitset style): \n ";
182 
183  int sizeW64 = 64; // 64 bits words
184  int iBit = 0;
185 
186  for (std::vector<bool>::const_reverse_iterator ritBit = m_gtTechnicalTriggerWord.rbegin();
187  ritBit != m_gtTechnicalTriggerWord.rend();
188  ++ritBit) {
189  myCout << (*ritBit ? '1' : '0');
190 
191  if ((((iBit + 1) % 16) == (sizeW64 % 16)) && (iBit != 63)) {
192  myCout << " ";
193  }
194 
195  iBit++;
196  }
197 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
void L1GlobalTriggerRecord::reset ( void  )

clear the record

Definition at line 200 of file L1GlobalTriggerRecord.cc.

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

200  {
201  m_gtGlobalDecision = false;
202 
203  for (std::vector<bool>::iterator itBit = m_gtDecisionWord.begin(); itBit != m_gtDecisionWord.end(); ++itBit) {
204  *itBit = false;
205  }
206  for (std::vector<bool>::iterator itBit = m_gtTechnicalTriggerWord.begin(); itBit != m_gtTechnicalTriggerWord.end();
207  ++itBit) {
208  *itBit = false;
209  }
210  for (std::vector<bool>::iterator itBit = m_gtDecisionWordBeforeMask.begin();
211  itBit != m_gtDecisionWordBeforeMask.end();
212  ++itBit) {
213  *itBit = false;
214  }
215 
216  for (std::vector<bool>::iterator itBit = m_gtTechnicalTriggerWordBeforeMask.begin();
217  itBit != m_gtTechnicalTriggerWordBeforeMask.end();
218  ++itBit) {
219  *itBit = false;
220  }
221 
224 }
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 114 of file L1GlobalTriggerRecord.cc.

References m_gtGlobalDecision.

114 { m_gtGlobalDecision = dValue; }
bool m_gtGlobalDecision
global decision for L1A bunch cross
void L1GlobalTriggerRecord::setDecisionWord ( const DecisionWord dWordValue)

Definition at line 117 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord.

117 { m_gtDecisionWord = dWordValue; }
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
void L1GlobalTriggerRecord::setDecisionWordBeforeMask ( const DecisionWord dWordValue)

Definition at line 124 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWordBeforeMask.

124  {
125  m_gtDecisionWordBeforeMask = dWordValue;
126 }
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 89 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexAlgo.

89  {
90  m_gtPrescaleFactorIndexAlgo = gtPrescaleFactorIndexAlgoValue;
91  }
unsigned int m_gtPrescaleFactorIndexAlgo
void L1GlobalTriggerRecord::setGtPrescaleFactorIndexTech ( const unsigned int &  gtPrescaleFactorIndexTechValue)
inline

Definition at line 83 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexTech.

83  {
84  m_gtPrescaleFactorIndexTech = gtPrescaleFactorIndexTechValue;
85  }
unsigned int m_gtPrescaleFactorIndexTech
void L1GlobalTriggerRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue)

Definition at line 119 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWord.

119  {
120  m_gtTechnicalTriggerWord = ttWordValue;
121 }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
void L1GlobalTriggerRecord::setTechnicalTriggerWordBeforeMask ( const TechnicalTriggerWord ttWordValue)

Definition at line 128 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWordBeforeMask.

128  {
130 }
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
const TechnicalTriggerWord L1GlobalTriggerRecord::technicalTriggerWord ( ) const
inline

Definition at line 62 of file L1GlobalTriggerRecord.h.

References m_gtTechnicalTriggerWord.

62 { return m_gtTechnicalTriggerWord; }
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
const TechnicalTriggerWord L1GlobalTriggerRecord::technicalTriggerWordBeforeMask ( ) const
inline

Definition at line 66 of file L1GlobalTriggerRecord.h.

References m_gtTechnicalTriggerWordBeforeMask.

66  {
68  }
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 241 of file L1GlobalTriggerRecord.cc.

241  {
242  result.print(streamRec);
243  return streamRec;
244 }
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 115 of file L1GlobalTriggerRecord.h.

Referenced by decisionWord(), 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 121 of file L1GlobalTriggerRecord.h.

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

bool L1GlobalTriggerRecord::m_gtGlobalDecision
private

global decision for L1A bunch cross

Definition at line 112 of file L1GlobalTriggerRecord.h.

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

unsigned int L1GlobalTriggerRecord::m_gtPrescaleFactorIndexAlgo
private
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 128 of file L1GlobalTriggerRecord.h.

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

TechnicalTriggerWord L1GlobalTriggerRecord::m_gtTechnicalTriggerWord
private

technical trigger word for L1A bunch cross

Definition at line 118 of file L1GlobalTriggerRecord.h.

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

TechnicalTriggerWord L1GlobalTriggerRecord::m_gtTechnicalTriggerWordBeforeMask
private

technical trigger word for L1A bunch cross before applying the masks

Definition at line 124 of file L1GlobalTriggerRecord.h.

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