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 L1GlobalTriggerRecord &)
 copy constructor More...
 
 L1GlobalTriggerRecord (const unsigned int numberPhysTriggers, const unsigned int numberTechnicalTriggers)
 
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() [1/3]

L1GlobalTriggerRecord::L1GlobalTriggerRecord ( )

constructors

Definition at line 25 of file L1GlobalTriggerRecord.cc.

25  {
26  // empty
27 }

◆ L1GlobalTriggerRecord() [2/3]

L1GlobalTriggerRecord::L1GlobalTriggerRecord ( const unsigned int  numberPhysTriggers,
const unsigned int  numberTechnicalTriggers 
)

Definition at line 29 of file L1GlobalTriggerRecord.cc.

30  {
31  m_gtDecisionWord.reserve(numberPhysTriggers);
32  m_gtTechnicalTriggerWord.reserve(numberTechnicalTriggers);
33 
34  m_gtDecisionWordBeforeMask.reserve(numberPhysTriggers);
35  m_gtTechnicalTriggerWordBeforeMask.reserve(numberTechnicalTriggers);
36 }

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtTechnicalTriggerWord, and m_gtTechnicalTriggerWordBeforeMask.

◆ L1GlobalTriggerRecord() [3/3]

L1GlobalTriggerRecord::L1GlobalTriggerRecord ( const L1GlobalTriggerRecord result)

copy constructor

Definition at line 39 of file L1GlobalTriggerRecord.cc.

39  {
40  m_gtGlobalDecision = result.m_gtGlobalDecision;
41 
42  m_gtDecisionWord = result.m_gtDecisionWord;
43  m_gtTechnicalTriggerWord = result.m_gtTechnicalTriggerWord;
44 
45  m_gtDecisionWordBeforeMask = result.m_gtDecisionWordBeforeMask;
46  m_gtTechnicalTriggerWordBeforeMask = result.m_gtTechnicalTriggerWordBeforeMask;
47 
48  m_gtPrescaleFactorIndexTech = result.m_gtPrescaleFactorIndexTech;
49  m_gtPrescaleFactorIndexAlgo = result.m_gtPrescaleFactorIndexAlgo;
50 }

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtGlobalDecision, m_gtPrescaleFactorIndexAlgo, m_gtPrescaleFactorIndexTech, m_gtTechnicalTriggerWord, m_gtTechnicalTriggerWordBeforeMask, and mps_fire::result.

◆ ~L1GlobalTriggerRecord()

L1GlobalTriggerRecord::~L1GlobalTriggerRecord ( )
virtual

destructor

Definition at line 53 of file L1GlobalTriggerRecord.cc.

53  {
54  // empty now
55 }

Member Function Documentation

◆ decision()

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.

58 { return m_gtGlobalDecision; }

References m_gtGlobalDecision.

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

◆ decisionWord()

const DecisionWord L1GlobalTriggerRecord::decisionWord ( ) const
inline

Definition at line 60 of file L1GlobalTriggerRecord.h.

60 { return m_gtDecisionWord; }

References m_gtDecisionWord.

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

◆ decisionWordBeforeMask()

const DecisionWord L1GlobalTriggerRecord::decisionWordBeforeMask ( ) const
inline

Definition at line 64 of file L1GlobalTriggerRecord.h.

References m_gtDecisionWordBeforeMask.

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

◆ gtPrescaleFactorIndexAlgo()

const unsigned int L1GlobalTriggerRecord::gtPrescaleFactorIndexAlgo ( ) const
inline

◆ gtPrescaleFactorIndexTech()

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.

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

◆ operator!=()

bool L1GlobalTriggerRecord::operator!= ( const L1GlobalTriggerRecord result) const

unequal operator

Definition at line 110 of file L1GlobalTriggerRecord.cc.

110 { return !(result == *this); }

References mps_fire::result.

◆ operator=()

L1GlobalTriggerRecord & L1GlobalTriggerRecord::operator= ( const L1GlobalTriggerRecord result)

assignment operator

Definition at line 58 of file L1GlobalTriggerRecord.cc.

58  {
59  if (this != &result) {
60  m_gtGlobalDecision = result.m_gtGlobalDecision;
61 
62  m_gtDecisionWord = result.m_gtDecisionWord;
63  m_gtTechnicalTriggerWord = result.m_gtTechnicalTriggerWord;
64 
65  m_gtDecisionWordBeforeMask = result.m_gtDecisionWordBeforeMask;
66  m_gtTechnicalTriggerWordBeforeMask = result.m_gtTechnicalTriggerWordBeforeMask;
67 
68  m_gtPrescaleFactorIndexTech = result.m_gtPrescaleFactorIndexTech;
69  m_gtPrescaleFactorIndexAlgo = result.m_gtPrescaleFactorIndexAlgo;
70  }
71 
72  return *this;
73 }

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtGlobalDecision, m_gtPrescaleFactorIndexAlgo, m_gtPrescaleFactorIndexTech, m_gtTechnicalTriggerWord, m_gtTechnicalTriggerWordBeforeMask, and mps_fire::result.

◆ operator==()

bool L1GlobalTriggerRecord::operator== ( const L1GlobalTriggerRecord result) const

equal operator

Definition at line 76 of file L1GlobalTriggerRecord.cc.

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 
85  if (m_gtTechnicalTriggerWord != result.m_gtTechnicalTriggerWord) {
86  return false;
87  }
88 
89  if (m_gtDecisionWordBeforeMask != result.m_gtDecisionWordBeforeMask) {
90  return false;
91  }
92 
93  if (m_gtTechnicalTriggerWordBeforeMask != result.m_gtTechnicalTriggerWordBeforeMask) {
94  return false;
95  }
96 
97  if (m_gtPrescaleFactorIndexTech != result.m_gtPrescaleFactorIndexTech) {
98  return false;
99  }
100 
101  if (m_gtPrescaleFactorIndexAlgo != result.m_gtPrescaleFactorIndexAlgo) {
102  return false;
103  }
104 
105  // all members identical
106  return true;
107 }

References m_gtDecisionWord, m_gtDecisionWordBeforeMask, m_gtGlobalDecision, m_gtPrescaleFactorIndexAlgo, m_gtPrescaleFactorIndexTech, m_gtTechnicalTriggerWord, m_gtTechnicalTriggerWordBeforeMask, and mps_fire::result.

◆ print()

void L1GlobalTriggerRecord::print ( std::ostream &  myCout) const

pretty print the content of a L1GlobalTriggerRecord

Definition at line 227 of file L1GlobalTriggerRecord.cc.

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 }

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

◆ printGtDecision()

void L1GlobalTriggerRecord::printGtDecision ( std::ostream &  myCout) const

print global decision and algorithm decision word

Definition at line 133 of file L1GlobalTriggerRecord.cc.

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 }

References m_gtDecisionWord, m_gtGlobalDecision, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by print().

◆ printTechnicalTrigger()

void L1GlobalTriggerRecord::printTechnicalTrigger ( std::ostream &  myCout) const

print technical triggers

Definition at line 180 of file L1GlobalTriggerRecord.cc.

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 }

References m_gtTechnicalTriggerWord.

Referenced by print().

◆ reset()

void L1GlobalTriggerRecord::reset ( void  )

clear the record

Definition at line 200 of file L1GlobalTriggerRecord.cc.

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 }

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

◆ setDecision()

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.

114 { m_gtGlobalDecision = dValue; }

References m_gtGlobalDecision.

◆ setDecisionWord()

void L1GlobalTriggerRecord::setDecisionWord ( const DecisionWord dWordValue)

Definition at line 117 of file L1GlobalTriggerRecord.cc.

117 { m_gtDecisionWord = dWordValue; }

References m_gtDecisionWord.

◆ setDecisionWordBeforeMask()

void L1GlobalTriggerRecord::setDecisionWordBeforeMask ( const DecisionWord dWordValue)

Definition at line 124 of file L1GlobalTriggerRecord.cc.

124  {
125  m_gtDecisionWordBeforeMask = dWordValue;
126 }

References m_gtDecisionWordBeforeMask.

◆ setGtPrescaleFactorIndexAlgo()

void L1GlobalTriggerRecord::setGtPrescaleFactorIndexAlgo ( const unsigned int &  gtPrescaleFactorIndexAlgoValue)
inline

Definition at line 89 of file L1GlobalTriggerRecord.h.

89  {
90  m_gtPrescaleFactorIndexAlgo = gtPrescaleFactorIndexAlgoValue;
91  }

References m_gtPrescaleFactorIndexAlgo.

◆ setGtPrescaleFactorIndexTech()

void L1GlobalTriggerRecord::setGtPrescaleFactorIndexTech ( const unsigned int &  gtPrescaleFactorIndexTechValue)
inline

Definition at line 83 of file L1GlobalTriggerRecord.h.

83  {
84  m_gtPrescaleFactorIndexTech = gtPrescaleFactorIndexTechValue;
85  }

References m_gtPrescaleFactorIndexTech.

◆ setTechnicalTriggerWord()

void L1GlobalTriggerRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue)

Definition at line 119 of file L1GlobalTriggerRecord.cc.

119  {
120  m_gtTechnicalTriggerWord = ttWordValue;
121 }

References m_gtTechnicalTriggerWord.

◆ setTechnicalTriggerWordBeforeMask()

void L1GlobalTriggerRecord::setTechnicalTriggerWordBeforeMask ( const TechnicalTriggerWord ttWordValue)

Definition at line 128 of file L1GlobalTriggerRecord.cc.

128  {
130 }

References m_gtTechnicalTriggerWordBeforeMask.

◆ technicalTriggerWord()

const TechnicalTriggerWord L1GlobalTriggerRecord::technicalTriggerWord ( ) const
inline

Definition at line 62 of file L1GlobalTriggerRecord.h.

62 { return m_gtTechnicalTriggerWord; }

References m_gtTechnicalTriggerWord.

Referenced by L1GtTrigReport::analyze().

◆ technicalTriggerWordBeforeMask()

const TechnicalTriggerWord L1GlobalTriggerRecord::technicalTriggerWordBeforeMask ( ) const
inline

Definition at line 66 of file L1GlobalTriggerRecord.h.

66  {
68  }

References m_gtTechnicalTriggerWordBeforeMask.

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

Friends And Related Function Documentation

◆ operator<<

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 }

Member Data Documentation

◆ m_gtDecisionWord

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().

◆ m_gtDecisionWordBeforeMask

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().

◆ m_gtGlobalDecision

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().

◆ m_gtPrescaleFactorIndexAlgo

unsigned int L1GlobalTriggerRecord::m_gtPrescaleFactorIndexAlgo
private

◆ m_gtPrescaleFactorIndexTech

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().

◆ m_gtTechnicalTriggerWord

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().

◆ m_gtTechnicalTriggerWordBeforeMask

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().

L1GlobalTriggerRecord::m_gtTechnicalTriggerWordBeforeMask
TechnicalTriggerWord m_gtTechnicalTriggerWordBeforeMask
technical trigger word for L1A bunch cross before applying the masks
Definition: L1GlobalTriggerRecord.h:124
L1GlobalTriggerRecord::m_gtDecisionWordBeforeMask
DecisionWord m_gtDecisionWordBeforeMask
algorithm decision word for L1A bunch cross before applying the masks
Definition: L1GlobalTriggerRecord.h:121
L1GlobalTriggerRecord::m_gtTechnicalTriggerWord
TechnicalTriggerWord m_gtTechnicalTriggerWord
technical trigger word for L1A bunch cross
Definition: L1GlobalTriggerRecord.h:118
L1GlobalTriggerRecord::printGtDecision
void printGtDecision(std::ostream &myCout) const
print global decision and algorithm decision word
Definition: L1GlobalTriggerRecord.cc:133
L1GlobalTriggerRecord::m_gtGlobalDecision
bool m_gtGlobalDecision
global decision for L1A bunch cross
Definition: L1GlobalTriggerRecord.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GlobalTriggerRecord::printTechnicalTrigger
void printTechnicalTrigger(std::ostream &myCout) const
print technical triggers
Definition: L1GlobalTriggerRecord.cc:180
L1GlobalTriggerRecord::m_gtPrescaleFactorIndexAlgo
unsigned int m_gtPrescaleFactorIndexAlgo
Definition: L1GlobalTriggerRecord.h:129
mps_fire.result
result
Definition: mps_fire.py:311
L1GlobalTriggerRecord::m_gtDecisionWord
DecisionWord m_gtDecisionWord
algorithm decision word for L1A bunch cross
Definition: L1GlobalTriggerRecord.h:115
L1GlobalTriggerRecord::m_gtPrescaleFactorIndexTech
unsigned int m_gtPrescaleFactorIndexTech
Definition: L1GlobalTriggerRecord.h:128