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

#include <L1GlobalTriggerEvmReadoutRecord.h>

Public Member Functions

const bool decision (int bxInEvent) const
 
const bool decision () const
 
const DecisionWord decisionWord (int bxInEvent) const
 
const DecisionWord decisionWord () const
 
const std::vector< L1GtFdlWordgtFdlVector () const
 get the vector of L1GtFdlWord More...
 
std::vector< L1GtFdlWord > & gtFdlVector ()
 
const L1GtFdlWord gtFdlWord (int bxInEvent) const
 get / set FDL word (record) in the GT readout record More...
 
const L1GtFdlWord gtFdlWord () const
 
const L1GtfeExtWord gtfeWord () const
 get / set GTFE word (record) in the GT readout record More...
 
 L1GlobalTriggerEvmReadoutRecord ()
 constructors More...
 
 L1GlobalTriggerEvmReadoutRecord (int NumberBxInEvent)
 
 L1GlobalTriggerEvmReadoutRecord (const int numberBxInEvent, const int numberFdlBoards)
 
 L1GlobalTriggerEvmReadoutRecord (const L1GlobalTriggerEvmReadoutRecord &)
 copy constructor More...
 
bool operator!= (const L1GlobalTriggerEvmReadoutRecord &) const
 unequal operator More...
 
L1GlobalTriggerEvmReadoutRecordoperator= (const L1GlobalTriggerEvmReadoutRecord &)
 assignment operator More...
 
bool operator== (const L1GlobalTriggerEvmReadoutRecord &) const
 equal operator More...
 
void print (std::ostream &myCout) const
 pretty print the content of a L1GlobalTriggerEvmReadoutRecord More...
 
void printGtDecision (std::ostream &myCout, int bxInEventValue) const
 print global decision and algorithm decision word More...
 
void printGtDecision (std::ostream &myCout) const
 
void printTechnicalTrigger (std::ostream &myCout, int bxInEventValue) const
 print technical triggers More...
 
void printTechnicalTrigger (std::ostream &myCout) const
 
void reset ()
 clear the record More...
 
void setDecision (bool t, int bxInEvent)
 set global decision and the decision word More...
 
void setDecision (bool t)
 
void setDecisionWord (const DecisionWord &decisionWordValue, int bxInEvent)
 
void setDecisionWord (const DecisionWord &decisionWordValue)
 
void setGtFdlWord (const L1GtFdlWord &, int bxInEvent)
 
void setGtFdlWord (const L1GtFdlWord &)
 
void setGtfeWord (const L1GtfeExtWord &)
 
void setTcsWord (const L1TcsWord &)
 
const L1TcsWord tcsWord () const
 get / set TCS word (record) in the GT readout record More...
 
virtual ~L1GlobalTriggerEvmReadoutRecord ()
 destructor More...
 

Private Attributes

std::vector< L1GtFdlWordm_gtFdlWord
 
L1GtfeExtWord m_gtfeWord
 
L1TcsWord m_tcsWord
 

Friends

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

Detailed Description

Description: EVM readout record for L1 Global Trigger.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Description: see header file.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 38 of file L1GlobalTriggerEvmReadoutRecord.h.

Constructor & Destructor Documentation

L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( )

constructors

Definition at line 32 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

33 {
34 
36  m_tcsWord = L1TcsWord();
37 
38  // reserve just one L1GtFdlWord
39  m_gtFdlWord.reserve(1);
40 
41 }
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( int  NumberBxInEvent)

Definition at line 43 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

44 {
45 
47  m_tcsWord = L1TcsWord();
48 
49  m_gtFdlWord.reserve(NumberBxInEvent);
50  m_gtFdlWord.assign(NumberBxInEvent, L1GtFdlWord());
51 
52  // min value of bxInEvent
53  int minBxInEvent = (NumberBxInEvent + 1)/2 - NumberBxInEvent;
54  //int maxBxInEvent = (NumberBxInEvent + 1)/2 - 1; // not needed
55 
56  // matrix index [0, NumberBxInEvent) -> bxInEvent [minBxInEvent, maxBxInEvent]
57  // warning: matrix index != bxInEvent
58  for (int iFdl = 0; iFdl < NumberBxInEvent; ++iFdl) {
59  int iBxInEvent = minBxInEvent + iFdl;
60  m_gtFdlWord[iFdl].setBxInEvent(iBxInEvent);
61  }
62 
63 }
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( const int  numberBxInEvent,
const int  numberFdlBoards 
)

Definition at line 65 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

68 {
69 
70  // GTFE board
72 
73  // TCS board
74  m_tcsWord = L1TcsWord();
75 
76  // FDL board
77  if (numberFdlBoards > 0) {
78  m_gtFdlWord.reserve(numberBxInEvent);
79  }
80 
81 }
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( const L1GlobalTriggerEvmReadoutRecord result)

copy constructor

Definition at line 85 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

L1GlobalTriggerEvmReadoutRecord::~L1GlobalTriggerEvmReadoutRecord ( )
virtual

destructor

Definition at line 96 of file L1GlobalTriggerEvmReadoutRecord.cc.

97 {
98 
99  // empty now
100 
101 }

Member Function Documentation

const bool L1GlobalTriggerEvmReadoutRecord::decision ( int  bxInEvent) const

get Global Trigger decision and the decision word overloaded w.r.t. bxInEvent argument bxInEvent not given: for bunch cross with L1Accept

Definition at line 155 of file L1GlobalTriggerEvmReadoutRecord.cc.

References edm::hlt::Exception, and m_gtFdlWord.

156 {
157 
158  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
159  itBx != m_gtFdlWord.end(); ++itBx) {
160 
161  if ( (*itBx).bxInEvent() == bxInEventValue ) {
162  return (*itBx).finalOR();
163  }
164  }
165 
166  // if bunch cross not found, throw exception (action: SkipEvent)
167 
168  throw cms::Exception("NotFound")
169  << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n"
170  << "Can not return global decision for this bx!\n"
171  << std::endl;
172 
173  return false;
174 }
const bool L1GlobalTriggerEvmReadoutRecord::decision ( ) const

Definition at line 200 of file L1GlobalTriggerEvmReadoutRecord.cc.

201 {
202 
203  int bxInEventL1Accept = 0;
204  return decision(bxInEventL1Accept);
205 }
const DecisionWord L1GlobalTriggerEvmReadoutRecord::decisionWord ( int  bxInEvent) const

Definition at line 176 of file L1GlobalTriggerEvmReadoutRecord.cc.

References edm::hlt::Exception, and m_gtFdlWord.

178 {
179 
180  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
181  itBx != m_gtFdlWord.end(); ++itBx) {
182 
183  if ( (*itBx).bxInEvent() == bxInEventValue ) {
184  return (*itBx).gtDecisionWord();
185  }
186  }
187 
188  // if bunch cross not found, throw exception (action: SkipEvent)
189 
190  throw cms::Exception("NotFound")
191  << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n"
192  << "Can not return decision word for this bx!\n"
193  << std::endl;
194 
195  DecisionWord dW; // empty; it does not arrive here
196  return dW;
197 }
std::vector< bool > DecisionWord
typedefs
const DecisionWord L1GlobalTriggerEvmReadoutRecord::decisionWord ( ) const

Definition at line 208 of file L1GlobalTriggerEvmReadoutRecord.cc.

209 {
210 
211  int bxInEventL1Accept = 0;
212  return decisionWord(bxInEventL1Accept);
213 }
const std::vector<L1GtFdlWord> L1GlobalTriggerEvmReadoutRecord::gtFdlVector ( ) const
inline

get the vector of L1GtFdlWord

Definition at line 107 of file L1GlobalTriggerEvmReadoutRecord.h.

References m_gtFdlWord.

108  {
109  return m_gtFdlWord;
110  }
std::vector<L1GtFdlWord>& L1GlobalTriggerEvmReadoutRecord::gtFdlVector ( )
inline

Definition at line 112 of file L1GlobalTriggerEvmReadoutRecord.h.

References m_gtFdlWord.

113  {
114  return m_gtFdlWord;
115  }
const L1GtFdlWord L1GlobalTriggerEvmReadoutRecord::gtFdlWord ( int  bxInEvent) const

get / set FDL word (record) in the GT readout record

Definition at line 379 of file L1GlobalTriggerEvmReadoutRecord.cc.

References edm::hlt::Exception, and m_gtFdlWord.

380 {
381 
382  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
383  itBx != m_gtFdlWord.end(); ++itBx) {
384 
385  if ( (*itBx).bxInEvent() == bxInEventValue ) {
386  return (*itBx);
387  }
388  }
389 
390  // if bunch cross not found, throw exception (action: SkipEvent)
391 
392  throw cms::Exception("NotFound")
393  << "\nError: requested L1GtFdlWord for bx = " << bxInEventValue << " does not exist.\n"
394  << std::endl;
395 
396  // return empty record - actually does not arrive here
397  return L1GtFdlWord();
398 
399 }
const L1GtFdlWord L1GlobalTriggerEvmReadoutRecord::gtFdlWord ( ) const

Definition at line 401 of file L1GlobalTriggerEvmReadoutRecord.cc.

402 {
403 
404  int bxInEventL1Accept = 0;
405  return gtFdlWord(bxInEventL1Accept);
406 }
const L1GtfeExtWord L1GlobalTriggerEvmReadoutRecord::gtfeWord ( ) const

get / set GTFE word (record) in the GT readout record

Definition at line 349 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtfeWord.

Referenced by DQMProvInfo::makeGtInfo().

350 {
351 
352  return m_gtfeWord;
353 
354 }
bool L1GlobalTriggerEvmReadoutRecord::operator!= ( const L1GlobalTriggerEvmReadoutRecord result) const

unequal operator

Definition at line 143 of file L1GlobalTriggerEvmReadoutRecord.cc.

145 {
146 
147  return !( result == *this);
148 
149 }
L1GlobalTriggerEvmReadoutRecord & L1GlobalTriggerEvmReadoutRecord::operator= ( const L1GlobalTriggerEvmReadoutRecord result)

assignment operator

Definition at line 104 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

106 {
107 
108  if ( this != &result ) {
109 
110  m_gtfeWord = result.m_gtfeWord;
111  m_tcsWord = result.m_tcsWord;
112  m_gtFdlWord = result.m_gtFdlWord;
113 
114  }
115 
116  return *this;
117 
118 }
bool L1GlobalTriggerEvmReadoutRecord::operator== ( const L1GlobalTriggerEvmReadoutRecord result) const

equal operator

Definition at line 121 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

123 {
124 
125  if (m_gtfeWord != result.m_gtfeWord) {
126  return false;
127  }
128 
129  if (m_tcsWord != result.m_tcsWord) {
130  return false;
131  }
132 
133  if (m_gtFdlWord != result.m_gtFdlWord) {
134  return false;
135  }
136 
137  // all members identical
138  return true;
139 
140 }
void L1GlobalTriggerEvmReadoutRecord::print ( std::ostream &  myCout) const

pretty print the content of a L1GlobalTriggerEvmReadoutRecord

pretty print the content of a L1GlobalTriggerReadoutRecord

Definition at line 454 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_tcsWord, L1GtfeExtWord::print(), and L1TcsWord::print().

455 {
456 
457  myCout << "\n L1GlobalTriggerEvmReadoutRecord::print \n" << std::endl;
458 
459  m_gtfeWord.print(myCout);
460 
461  m_tcsWord.print(myCout);
462 
463  for (std::vector<L1GtFdlWord>::const_iterator itFdl = m_gtFdlWord.begin();
464  itFdl != m_gtFdlWord.end(); ++itFdl) {
465 
466  itFdl->print(myCout);
467 
468  }
469 
470 }
void print(std::ostream &myCout) const
pretty print the content of a L1TcsWord
Definition: L1TcsWord.cc:405
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeExtWord
void L1GlobalTriggerEvmReadoutRecord::printGtDecision ( std::ostream &  myCout,
int  bxInEventValue 
) const

print global decision and algorithm decision word

Definition at line 278 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord.

Referenced by printGtDecision().

280 {
281 
282  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
283  itBx != m_gtFdlWord.end(); ++itBx) {
284 
285  if ( (*itBx).bxInEvent() == bxInEventValue ) {
286 
287  myCout << "\nL1 Global Trigger Record: " << std::endl;
288 
289  myCout
290  << "\t Bunch cross " << bxInEventValue
291  << std::endl
292  << "\t Global Decision = " << std::setw(5) << (*itBx).globalDecision()
293  << std::endl
294  << "\t Decision word (bitset style) = ";
295 
296  (*itBx).printGtDecisionWord(myCout);
297  }
298  }
299 
300  myCout << std::endl;
301 
302 }
void L1GlobalTriggerEvmReadoutRecord::printGtDecision ( std::ostream &  myCout) const

Definition at line 304 of file L1GlobalTriggerEvmReadoutRecord.cc.

References printGtDecision().

305 {
306 
307  int bxInEventL1Accept = 0;
308  printGtDecision(myCout, bxInEventL1Accept);
309 
310 }
void printGtDecision(std::ostream &myCout, int bxInEventValue) const
print global decision and algorithm decision word
void L1GlobalTriggerEvmReadoutRecord::printTechnicalTrigger ( std::ostream &  myCout,
int  bxInEventValue 
) const

print technical triggers

Definition at line 313 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord.

Referenced by printTechnicalTrigger().

316 {
317 
318  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
319  itBx != m_gtFdlWord.end(); ++itBx) {
320 
321  if ( (*itBx).bxInEvent() == bxInEventValue ) {
322 
323  myCout << "\nL1 Global Trigger Record: " << std::endl;
324 
325  myCout
326  << "\t Bunch cross " << bxInEventValue
327  << std::endl
328  << "\t Technical Trigger word (bitset style) = ";
329 
330  (*itBx).printGtTechnicalTriggerWord(myCout);
331  }
332  }
333 
334  myCout << std::endl;
335 
336 }
void L1GlobalTriggerEvmReadoutRecord::printTechnicalTrigger ( std::ostream &  myCout) const

Definition at line 338 of file L1GlobalTriggerEvmReadoutRecord.cc.

References printTechnicalTrigger().

339 {
340 
341  int bxInEventL1Accept = 0;
342  printTechnicalTrigger(myCout, bxInEventL1Accept);
343 
344 }
void printTechnicalTrigger(std::ostream &myCout, int bxInEventValue) const
print technical triggers
void L1GlobalTriggerEvmReadoutRecord::reset ( void  )

clear the record

Definition at line 446 of file L1GlobalTriggerEvmReadoutRecord.cc.

Referenced by BeautifulSoup.BeautifulStoneSoup::__init__().

447 {
448 
449  // TODO FIXME clear GTFE, TCS, FDL?
450 
451 }
void L1GlobalTriggerEvmReadoutRecord::setDecision ( bool  t,
int  bxInEvent 
)

set global decision and the decision word

Definition at line 218 of file L1GlobalTriggerEvmReadoutRecord.cc.

References edm::hlt::Exception, and m_gtFdlWord.

Referenced by setDecision().

219 {
220 
221  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
222  itBx != m_gtFdlWord.end(); ++itBx) {
223 
224  if ( (*itBx).bxInEvent() == bxInEventValue ) {
225  (*itBx).setFinalOR(static_cast<uint16_t> (t)); // TODO FIXME when manipulating partitions
226  }
227  }
228 
229  // if bunch cross not found, throw exception (action: SkipEvent)
230 
231  throw cms::Exception("NotFound")
232  << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n"
233  << "Can not set global decision for this bx!\n"
234  << std::endl;
235 
236 }
void L1GlobalTriggerEvmReadoutRecord::setDecision ( bool  t)

Definition at line 261 of file L1GlobalTriggerEvmReadoutRecord.cc.

References setDecision().

262 {
263 
264  int bxInEventL1Accept = 0;
265  setDecision(t, bxInEventL1Accept);
266 }
void setDecision(bool t, int bxInEvent)
set global decision and the decision word
void L1GlobalTriggerEvmReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue,
int  bxInEvent 
)

Definition at line 238 of file L1GlobalTriggerEvmReadoutRecord.cc.

References edm::hlt::Exception, and m_gtFdlWord.

Referenced by setDecisionWord().

241 {
242 
243  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
244  itBx != m_gtFdlWord.end(); ++itBx) {
245 
246  if ( (*itBx).bxInEvent() == bxInEventValue ) {
247  (*itBx).setGtDecisionWord (decisionWordValue);
248  }
249  }
250 
251  // if bunch cross not found, throw exception (action: SkipEvent)
252 
253  throw cms::Exception("NotFound")
254  << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n"
255  << "Can not set decision word for this bx!\n"
256  << std::endl;
257 
258 }
void L1GlobalTriggerEvmReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue)

Definition at line 268 of file L1GlobalTriggerEvmReadoutRecord.cc.

References setDecisionWord().

270 {
271 
272  int bxInEventL1Accept = 0;
273  setDecisionWord(decisionWordValue, bxInEventL1Accept);
274 
275 }
void setDecisionWord(const DecisionWord &decisionWordValue, int bxInEvent)
void L1GlobalTriggerEvmReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue,
int  bxInEvent 
)

Definition at line 408 of file L1GlobalTriggerEvmReadoutRecord.cc.

References edm::hlt::Exception, LogDebug, and m_gtFdlWord.

410 {
411 
412  // if a L1GtFdlWord exists for bxInEventValue, replace it
413  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
414  itBx != m_gtFdlWord.end(); ++itBx) {
415 
416  if ( (*itBx).bxInEvent() == bxInEventValue ) {
417  *itBx = gtFdlWordValue;
418  LogDebug("L1GlobalTriggerEvmReadoutRecord")
419  << "Replacing L1GtFdlWord for bunch bx = " << bxInEventValue << "\n"
420  << std::endl;
421  return;
422  }
423  }
424 
425  // if bunch cross not found, throw exception (action: SkipEvent)
426  // all L1GtFdlWord are created in the record constructor for allowed bunch crosses
427 
428  throw cms::Exception("NotFound")
429  << "\nError: Cannot set L1GtFdlWord for bx = " << bxInEventValue
430  << std::endl;
431 
432 }
#define LogDebug(id)
void L1GlobalTriggerEvmReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue)

Definition at line 434 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord.

435 {
436 
437  // just push back the new FDL block
438  m_gtFdlWord.push_back(gtFdlWordValue);
439 
440 }
void L1GlobalTriggerEvmReadoutRecord::setGtfeWord ( const L1GtfeExtWord gtfeWordValue)

Definition at line 356 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtfeWord.

357 {
358 
359  m_gtfeWord = gtfeWordValue;
360 
361 }
void L1GlobalTriggerEvmReadoutRecord::setTcsWord ( const L1TcsWord tcsWordValue)

Definition at line 371 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_tcsWord.

372 {
373 
374  m_tcsWord = tcsWordValue;
375 
376 }
const L1TcsWord L1GlobalTriggerEvmReadoutRecord::tcsWord ( ) const

get / set TCS word (record) in the GT readout record

Definition at line 364 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_tcsWord.

365 {
366 
367  return m_tcsWord;
368 
369 }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const L1GlobalTriggerEvmReadoutRecord result 
)
friend

output stream operator

Definition at line 474 of file L1GlobalTriggerEvmReadoutRecord.cc.

475 {
476  // TODO FIXME put together all prints
477  s << "Not available yet - sorry";
478 
479  return s;
480 
481 }
string s
Definition: asciidump.py:422

Member Data Documentation

std::vector<L1GtFdlWord> L1GlobalTriggerEvmReadoutRecord::m_gtFdlWord
private
L1GtfeExtWord L1GlobalTriggerEvmReadoutRecord::m_gtfeWord
private
L1TcsWord L1GlobalTriggerEvmReadoutRecord::m_tcsWord
private