CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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

$Date$ $Revision$

Definition at line 35 of file L1GlobalTriggerRecord.h.

Constructor & Destructor Documentation

L1GlobalTriggerRecord::L1GlobalTriggerRecord ( )

constructors

Definition at line 28 of file L1GlobalTriggerRecord.cc.

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

Definition at line 35 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

36  {
37 
38  m_gtDecisionWord.reserve(numberPhysTriggers);
39  m_gtTechnicalTriggerWord.reserve(numberTechnicalTriggers);
40 
41  m_gtDecisionWordBeforeMask.reserve(numberPhysTriggers);
42  m_gtTechnicalTriggerWordBeforeMask.reserve(numberTechnicalTriggers);
43 
44 }
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 47 of file L1GlobalTriggerRecord.cc.

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

49 {
50 
52 
55 
58 
61 
62 }
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 65 of file L1GlobalTriggerRecord.cc.

66 {
67 
68  // empty now
69 
70 }

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

References m_gtGlobalDecision.

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

Definition at line 69 of file L1GlobalTriggerRecord.h.

References m_gtDecisionWord.

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

Definition at line 77 of file L1GlobalTriggerRecord.h.

References m_gtDecisionWordBeforeMask.

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

Definition at line 106 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexAlgo.

106  {
108  }
unsigned int m_gtPrescaleFactorIndexAlgo
const unsigned int L1GlobalTriggerRecord::gtPrescaleFactorIndexTech ( ) const
inline

get/set index of the set of prescale factors

Definition at line 97 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexTech.

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

unequal operator

Definition at line 134 of file L1GlobalTriggerRecord.cc.

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

assignment operator

Definition at line 73 of file L1GlobalTriggerRecord.cc.

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

75 {
76 
77  if ( this != &result ) {
78 
80 
83 
86 
89  }
90 
91  return *this;
92 
93 }
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 96 of file L1GlobalTriggerRecord.cc.

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

98 {
99 
100  if (m_gtGlobalDecision != result.m_gtGlobalDecision) {
101  return false;
102  }
103 
104  if (m_gtDecisionWord != result.m_gtDecisionWord) {
105  return false;
106  }
107 
109  return false;
110  }
111 
113  return false;
114  }
115 
117  return false;
118  }
119 
121  return false;
122  }
123 
125  return false;
126  }
127 
128  // all members identical
129  return true;
130 
131 }
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 306 of file L1GlobalTriggerRecord.cc.

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

Referenced by operator<<().

307 {
308 
309  printGtDecision(myCout);
310 
311  myCout << std::endl;
312 
313  printTechnicalTrigger(myCout);
314 
315  myCout << std::endl;
316  myCout << "\n Index of prescale factor set for technical triggers: "
317  << m_gtPrescaleFactorIndexTech << std::endl;
318  myCout << " Index of prescale factor set for algorithm triggers: "
319  << m_gtPrescaleFactorIndexTech << std::endl;
320  myCout << std::endl;
321 
322 
323 }
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 188 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord, and m_gtGlobalDecision.

Referenced by print().

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

References m_gtTechnicalTriggerWord.

Referenced by print().

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

clear the record

Definition at line 268 of file L1GlobalTriggerRecord.cc.

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

269 {
270 
271  m_gtGlobalDecision = false;
272 
273  for (std::vector<bool>::iterator itBit = m_gtDecisionWord.begin();
274  itBit != m_gtDecisionWord.end(); ++itBit) {
275 
276  *itBit = false;
277 
278  }
279  for (std::vector<bool>::iterator itBit = m_gtTechnicalTriggerWord.begin();
280  itBit != m_gtTechnicalTriggerWord.end(); ++itBit) {
281 
282  *itBit = false;
283 
284  }
285  for (std::vector<bool>::iterator itBit = m_gtDecisionWordBeforeMask.begin();
286  itBit != m_gtDecisionWordBeforeMask.end(); ++itBit) {
287 
288  *itBit = false;
289 
290  }
291 
292  for (std::vector<bool>::iterator itBit = m_gtTechnicalTriggerWordBeforeMask.begin();
293  itBit != m_gtTechnicalTriggerWordBeforeMask.end(); ++itBit) {
294 
295  *itBit = false;
296 
297  }
298 
301 
302 }
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 145 of file L1GlobalTriggerRecord.cc.

References m_gtGlobalDecision.

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

Definition at line 153 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWord.

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

Definition at line 170 of file L1GlobalTriggerRecord.cc.

References m_gtDecisionWordBeforeMask.

172 {
173 
174  m_gtDecisionWordBeforeMask = dWordValue;
175 
176 }
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 110 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexAlgo.

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

Definition at line 101 of file L1GlobalTriggerRecord.h.

References m_gtPrescaleFactorIndexTech.

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

Definition at line 161 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWord.

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

Definition at line 178 of file L1GlobalTriggerRecord.cc.

References m_gtTechnicalTriggerWordBeforeMask.

180 {
181 
183 
184 }
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
const TechnicalTriggerWord L1GlobalTriggerRecord::technicalTriggerWord ( ) const
inline

Definition at line 73 of file L1GlobalTriggerRecord.h.

References m_gtTechnicalTriggerWord.

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

Definition at line 81 of file L1GlobalTriggerRecord.h.

References m_gtTechnicalTriggerWordBeforeMask.

81  {
83  }
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 326 of file L1GlobalTriggerRecord.cc.

327 {
328  result.print(streamRec);
329  return streamRec;
330 
331 }
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 139 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 145 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 136 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 152 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 142 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 148 of file L1GlobalTriggerRecord.h.

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