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

#include <L1GlobalTriggerReadoutRecord.h>

Public Member Functions

const bool decision (int bxInEventValue) const
 
const bool decision () const
 
const DecisionWorddecisionWord (int bxInEventValue) const
 
const DecisionWorddecisionWord () const
 
const cms_uint16_t finalOR (int bxInEventValue) const
 
const cms_uint16_t finalOR () const
 
const std::vector< L1GtFdlWordgtFdlVector () const
 get the vector of L1GtFdlWord More...
 
std::vector< L1GtFdlWord > & gtFdlVector ()
 
const L1GtFdlWord gtFdlWord (int bxInEventValue) const
 get / set FDL word (record) in the GT readout record More...
 
const L1GtFdlWord gtFdlWord () const
 
const L1GtfeWord gtfeWord () const
 get / set GTFE word (record) in the GT readout record More...
 
const std::vector< L1GtPsbWordgtPsbVector () const
 get the vector of L1GtPsbWord More...
 
std::vector< L1GtPsbWord > & gtPsbVector ()
 
const L1GtPsbWord gtPsbWord (cms_uint16_t boardIdValue, int bxInEventValue) const
 get / set PSB word (record) in the GT readout record More...
 
const L1GtPsbWord gtPsbWord (cms_uint16_t boardIdValue) const
 
 L1GlobalTriggerReadoutRecord ()
 constructors More...
 
 L1GlobalTriggerReadoutRecord (int NumberBxInEvent)
 
 L1GlobalTriggerReadoutRecord (const int numberBxInEvent, const int numberFdlBoards, const int numberPsbBoards)
 
 L1GlobalTriggerReadoutRecord (const L1GlobalTriggerReadoutRecord &)
 copy constructor More...
 
const edm::RefProd
< L1MuGMTReadoutCollection
muCollectionRefProd () const
 get / set reference to L1MuGMTReadoutCollection More...
 
bool operator!= (const L1GlobalTriggerReadoutRecord &) const
 unequal operator More...
 
L1GlobalTriggerReadoutRecordoperator= (const L1GlobalTriggerReadoutRecord &)
 assignment operator More...
 
bool operator== (const L1GlobalTriggerReadoutRecord &) const
 equal operator More...
 
void print (std::ostream &myCout) const
 pretty print the content of a L1GlobalTriggerReadoutRecord 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 (const bool &t, int bxInEventValue)
 set global decision, decision word and technical trigger word More...
 
void setDecision (const bool &t)
 
void setDecisionWord (const DecisionWord &decisionWordValue, int bxInEventValue)
 
void setDecisionWord (const DecisionWord &decisionWordValue)
 
void setGtFdlWord (const L1GtFdlWord &, int bxInEventValue)
 
void setGtFdlWord (const L1GtFdlWord &)
 
void setGtfeWord (const L1GtfeWord &)
 
void setGtPsbWord (const L1GtPsbWord &, cms_uint16_t boardIdValue, int bxInEventValue)
 
void setGtPsbWord (const L1GtPsbWord &, cms_uint16_t boardIdValue)
 
void setGtPsbWord (const L1GtPsbWord &gtPsbWordValue)
 
void setMuCollectionRefProd (edm::Handle< L1MuGMTReadoutCollection > &)
 
void setMuCollectionRefProd (const edm::RefProd< L1MuGMTReadoutCollection > &)
 
void setTechnicalTriggerWord (const TechnicalTriggerWord &ttWordValue, int bxInEventValue)
 
void setTechnicalTriggerWord (const TechnicalTriggerWord &ttWordValue)
 
const TechnicalTriggerWordtechnicalTriggerWord (int bxInEventValue) const
 
const TechnicalTriggerWordtechnicalTriggerWord () const
 
virtual ~L1GlobalTriggerReadoutRecord ()
 destructor More...
 

Private Attributes

std::vector< L1GtFdlWordm_gtFdlWord
 
L1GtfeWord m_gtfeWord
 
std::vector< L1GtPsbWordm_gtPsbWord
 
edm::RefProd
< L1MuGMTReadoutCollection
m_muCollRefProd
 

Friends

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

Detailed Description

Description: readout record for L1 Global Trigger.

Implementation: <TODO: enter implementation details>

Author
: N. Neumeister - HEPHY Vienna - ORCA version
: Vasile Mihai Ghete - HEPHY Vienna - CMSSW version

Description: see header file.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 47 of file L1GlobalTriggerReadoutRecord.h.

Constructor & Destructor Documentation

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( )

constructors

Definition at line 30 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

31 {
32 
33  // empty GTFE
35 
36  // no FDL, no PSB
37 }
L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( int  NumberBxInEvent)

Definition at line 39 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and L1GlobalTriggerReadoutSetup::NumberPsbBoards.

40 {
41 
43 
44  m_gtFdlWord.reserve(numberBxInEvent);
45  m_gtFdlWord.assign(numberBxInEvent, L1GtFdlWord());
46 
47  // min value of bxInEvent
48  int minBxInEvent = (numberBxInEvent + 1)/2 - numberBxInEvent;
49  //int maxBxInEvent = (numberBxInEvent + 1)/2 - 1; // not needed
50 
51  // matrix index [0, numberBxInEvent) -> bxInEvent [minBxInEvent, maxBxInEvent]
52  // warning: matrix index != bxInEvent
53  for (int iFdl = 0; iFdl < numberBxInEvent; ++iFdl) {
54  int iBxInEvent = minBxInEvent + iFdl;
55  m_gtFdlWord[iFdl].setBxInEvent(iBxInEvent);
56  }
57 
58  // PSBs
60  int totalNumberPsb = numberPsb*numberBxInEvent;
61 
62  m_gtPsbWord.reserve(totalNumberPsb);
63  m_gtPsbWord.assign(totalNumberPsb, L1GtPsbWord());
64 
65 
66 }
static const int NumberPsbBoards
number of PSB boards in GT
std::vector< L1GtPsbWord > m_gtPsbWord
std::vector< L1GtFdlWord > m_gtFdlWord
L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( const int  numberBxInEvent,
const int  numberFdlBoards,
const int  numberPsbBoards 
)

Definition at line 68 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_gtPsbWord.

72 {
73 
74  // GTFE board
76 
77  // FDL board
78  if (numberFdlBoards > 0) {
79  m_gtFdlWord.reserve(numberBxInEvent);
80  }
81 
82  // PSB boards
83  if (numberPsbBoards > 0) {
84  m_gtPsbWord.reserve(numberPsbBoards*numberBxInEvent);
85  }
86 
87 }
std::vector< L1GtPsbWord > m_gtPsbWord
std::vector< L1GtFdlWord > m_gtFdlWord
L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( const L1GlobalTriggerReadoutRecord result)

copy constructor

Definition at line 90 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

92 {
93 
94  m_gtfeWord = result.m_gtfeWord;
95  m_gtFdlWord = result.m_gtFdlWord;
96  m_gtPsbWord = result.m_gtPsbWord;
97 
99 
100 
101 }
std::vector< L1GtPsbWord > m_gtPsbWord
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
std::vector< L1GtFdlWord > m_gtFdlWord
L1GlobalTriggerReadoutRecord::~L1GlobalTriggerReadoutRecord ( )
virtual

destructor

Definition at line 104 of file L1GlobalTriggerReadoutRecord.cc.

105 {
106 
107  // empty now
108 
109 }

Member Function Documentation

const bool L1GlobalTriggerReadoutRecord::decision ( int  bxInEventValue) const

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

Definition at line 169 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

170 {
171 
172  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
173  itBx != m_gtFdlWord.end(); ++itBx) {
174 
175  if ( (*itBx).bxInEvent() == bxInEventValue ) {
176  return (*itBx).finalOR();
177  }
178  }
179 
180  // if bunch cross not found, throw exception (action: SkipEvent)
181  // TODO re-evaluate action
182 
183  // throw cms::Exception("NotFound")
184  LogTrace("L1GlobalTriggerReadoutRecord")
185  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
186  << " does not exist.\n"
187  << "Can not return global decision for this bx!\n"
188  << std::endl;
189 
190  return false;
191 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const bool L1GlobalTriggerReadoutRecord::decision ( ) const

Definition at line 194 of file L1GlobalTriggerReadoutRecord.cc.

195 {
196 
197  int bxInEventL1Accept = 0;
198  return decision(bxInEventL1Accept);
199 }
const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( int  bxInEventValue) const

Definition at line 239 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by TriggerRatesMonitor::analyze(), FWL1TriggerTableView::fillTable(), triggerExpression::L1AlgoReader::operator()(), and HLTLevel1GTSeed::seedsL1TriggerObjectMaps().

240 {
241  const static DecisionWord emptyDecisionWord;
242 
243  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
244  itBx != m_gtFdlWord.end(); ++itBx) {
245 
246  if ( (*itBx).bxInEvent() == bxInEventValue ) {
247  return (*itBx).gtDecisionWord();
248  }
249  }
250 
251  // if bunch cross not found, throw exception (action: SkipEvent)
252  // TODO re-evaluate action
253 
254  // throw cms::Exception("NotFound")
255  LogTrace("L1GlobalTriggerReadoutRecord")
256  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
257  << " does not exist.\n"
258  << "Can not return decision word for this bx!\n"
259  << std::endl;
260 
261  return emptyDecisionWord;
262 }
std::vector< bool > DecisionWord
typedefs
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( ) const

Definition at line 265 of file L1GlobalTriggerReadoutRecord.cc.

266 {
267 
268  int bxInEventL1Accept = 0;
269  return decisionWord(bxInEventL1Accept);
270 }
const DecisionWord & decisionWord() const
const cms_uint16_t L1GlobalTriggerReadoutRecord::finalOR ( int  bxInEventValue) const

Definition at line 203 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

204 {
205 
206  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
207  itBx != m_gtFdlWord.end(); ++itBx) {
208 
209  if ( (*itBx).bxInEvent() == bxInEventValue ) {
210  return (*itBx).finalOR();
211  }
212  }
213 
214  // if bunch cross not found, throw exception (action: SkipEvent)
215  // TODO re-evaluate action
216 
217  // throw cms::Exception("NotFound")
218  LogTrace("L1GlobalTriggerReadoutRecord")
219  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
220  << " does not exist.\n"
221  << "Can not return finalOR for this bx!\n"
222  << std::endl;
223 
224  return 0;
225 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const cms_uint16_t L1GlobalTriggerReadoutRecord::finalOR ( ) const

Definition at line 228 of file L1GlobalTriggerReadoutRecord.cc.

229 {
230 
231  int bxInEventL1Accept = 0;
232  return finalOR(bxInEventL1Accept);
233 }
const std::vector<L1GtFdlWord> L1GlobalTriggerReadoutRecord::gtFdlVector ( ) const
inline

get the vector of L1GtFdlWord

Definition at line 132 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

133  {
134  return m_gtFdlWord;
135  }
std::vector< L1GtFdlWord > m_gtFdlWord
std::vector<L1GtFdlWord>& L1GlobalTriggerReadoutRecord::gtFdlVector ( )
inline

Definition at line 137 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

138  {
139  return m_gtFdlWord;
140  }
std::vector< L1GtFdlWord > m_gtFdlWord
const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( int  bxInEventValue) const

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

Definition at line 524 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by FWL1TriggerTableView::fillTable(), PhysDecl::filter(), DQMDcsInfo::makeGtInfo(), and DQMProvInfo::makeGtInfo().

525 {
526 
527  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
528  itBx != m_gtFdlWord.end(); ++itBx) {
529 
530  if ( (*itBx).bxInEvent() == bxInEventValue ) {
531  return (*itBx);
532  }
533  }
534 
535  // if bunch cross not found, throw exception (action: SkipEvent)
536 
537  // throw cms::Exception("NotFound")
538  LogTrace("L1GlobalTriggerReadoutRecord")
539  << "\nError: requested L1GtFdlWord for bxInEvent = " << bxInEventValue
540  << " does not exist.\n"
541  << std::endl;
542 
543  // return empty record - actually does not arrive here
544  return L1GtFdlWord();
545 
546 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( ) const

Definition at line 548 of file L1GlobalTriggerReadoutRecord.cc.

549 {
550 
551  int bxInEventL1Accept = 0;
552  return gtFdlWord(bxInEventL1Accept);
553 }
const L1GtfeWord L1GlobalTriggerReadoutRecord::gtfeWord ( ) const

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

Definition at line 509 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

510 {
511 
512  return m_gtfeWord;
513 
514 }
const std::vector<L1GtPsbWord> L1GlobalTriggerReadoutRecord::gtPsbVector ( ) const
inline

get the vector of L1GtPsbWord

Definition at line 150 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

151  {
152  return m_gtPsbWord;
153  }
std::vector< L1GtPsbWord > m_gtPsbWord
std::vector<L1GtPsbWord>& L1GlobalTriggerReadoutRecord::gtPsbVector ( )
inline

Definition at line 155 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

156  {
157  return m_gtPsbWord;
158  }
std::vector< L1GtPsbWord > m_gtPsbWord
const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( cms_uint16_t  boardIdValue,
int  bxInEventValue 
) const

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

Definition at line 593 of file L1GlobalTriggerReadoutRecord.cc.

References TauDecayModes::dec, LogTrace, and m_gtPsbWord.

Referenced by EcalCosmicsHists::determineTriggers(), EcalExclusiveTrigFilter::filter(), gtPsbWord(), and triggerExpression::L1TechReader::operator()().

595 {
596 
597  for (std::vector<L1GtPsbWord>::const_iterator itBx = m_gtPsbWord.begin();
598  itBx != m_gtPsbWord.end(); ++itBx) {
599 
600  if (
601  ((*itBx).bxInEvent() == bxInEventValue) &&
602  ((*itBx).boardId() == boardIdValue)) {
603 
604  return (*itBx);
605 
606  }
607  }
608 
609  // if bunch cross or boardId not found, throw exception (action: SkipEvent)
610 
611  // throw cms::Exception("NotFound")
612  LogTrace("L1GlobalTriggerReadoutRecord")
613  << "\nError: requested L1GtPsbWord for boardId = "
614  << std::hex << boardIdValue << std::dec
615  << " and bxInEvent = " << bxInEventValue
616  << " does not exist.\n"
617  << std::endl;
618 
619  // return empty record - actually does not arrive here
620  return L1GtPsbWord();
621 
622 }
std::vector< L1GtPsbWord > m_gtPsbWord
#define LogTrace(id)
const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( cms_uint16_t  boardIdValue) const

Definition at line 624 of file L1GlobalTriggerReadoutRecord.cc.

References gtPsbWord().

625 {
626 
627  int bxInEventL1Accept = 0;
628  return gtPsbWord(boardIdValue, bxInEventL1Accept);
629 }
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
const edm::RefProd< L1MuGMTReadoutCollection > L1GlobalTriggerReadoutRecord::muCollectionRefProd ( ) const

get / set reference to L1MuGMTReadoutCollection

Definition at line 483 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

484 {
485 
486  return m_muCollRefProd;
487 }
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
bool L1GlobalTriggerReadoutRecord::operator!= ( const L1GlobalTriggerReadoutRecord result) const

unequal operator

Definition at line 157 of file L1GlobalTriggerReadoutRecord.cc.

159 {
160 
161  return !( result == *this);
162 
163 }
L1GlobalTriggerReadoutRecord & L1GlobalTriggerReadoutRecord::operator= ( const L1GlobalTriggerReadoutRecord result)

assignment operator

Definition at line 112 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

114 {
115 
116  if ( this != &result ) {
117 
118  m_gtfeWord = result.m_gtfeWord;
119  m_gtFdlWord = result.m_gtFdlWord;
120  m_gtPsbWord = result.m_gtPsbWord;
121 
123 
124  }
125 
126  return *this;
127 
128 }
std::vector< L1GtPsbWord > m_gtPsbWord
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
std::vector< L1GtFdlWord > m_gtFdlWord
bool L1GlobalTriggerReadoutRecord::operator== ( const L1GlobalTriggerReadoutRecord result) const

equal operator

Definition at line 131 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

133 {
134 
135  if (m_gtfeWord != result.m_gtfeWord) {
136  return false;
137  }
138 
139  if (m_gtFdlWord != result.m_gtFdlWord) {
140  return false;
141  }
142 
143  if (m_gtPsbWord != result.m_gtPsbWord) {
144  return false;
145  }
146 
147  if (m_muCollRefProd != result.m_muCollRefProd) {
148  return false;
149  }
150 
151  // all members identical
152  return true;
153 
154 }
std::vector< L1GtPsbWord > m_gtPsbWord
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::print ( std::ostream &  myCout) const

pretty print the content of a L1GlobalTriggerReadoutRecord

Definition at line 736 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and L1GtfeWord::print().

737 {
738 
739  myCout << "\n L1GlobalTriggerReadoutRecord::print \n" << std::endl;
740 
741  m_gtfeWord.print(myCout);
742 
743  for (std::vector<L1GtFdlWord>::const_iterator itFdl = m_gtFdlWord.begin();
744  itFdl != m_gtFdlWord.end(); ++itFdl) {
745 
746  itFdl->print(myCout);
747 
748  }
749 
750  for (std::vector<L1GtPsbWord>::const_iterator itPsb = m_gtPsbWord.begin();
751  itPsb != m_gtPsbWord.end(); ++itPsb) {
752 
753  itPsb->print(myCout);
754 
755  }
756 
757  // FIXME add L1MuGMTReadoutCollection printing
758  // edm::RefProd<L1MuGMTReadoutCollection> m_muCollRefProd;
759 
760 
761 
762 
763 }
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeWord
Definition: L1GtfeWord.cc:321
std::vector< L1GtPsbWord > m_gtPsbWord
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::printGtDecision ( std::ostream &  myCout,
int  bxInEventValue 
) const

print global decision and algorithm decision word

Definition at line 415 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

Referenced by printGtDecision(), and HLTLevel1GTSeed::seedsL1TriggerObjectMaps().

417 {
418 
419  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
420  itBx != m_gtFdlWord.end(); ++itBx) {
421 
422  if ( (*itBx).bxInEvent() == bxInEventValue ) {
423 
424  myCout << "\nL1 Global Trigger Record: " << std::endl;
425 
426  myCout << " Bunch cross " << bxInEventValue
427  << std::endl
428  << " Global Decision = " << std::setw(5) << (*itBx).globalDecision()
429  << std::endl;
430 
431  (*itBx).printGtDecisionWord(myCout);
432 
433  }
434  }
435 
436  myCout << std::endl;
437 
438 }
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::printGtDecision ( std::ostream &  myCout) const

Definition at line 440 of file L1GlobalTriggerReadoutRecord.cc.

References printGtDecision().

441 {
442 
443  int bxInEventL1Accept = 0;
444  printGtDecision(myCout, bxInEventL1Accept);
445 
446 }
void printGtDecision(std::ostream &myCout, int bxInEventValue) const
print global decision and algorithm decision word
void L1GlobalTriggerReadoutRecord::printTechnicalTrigger ( std::ostream &  myCout,
int  bxInEventValue 
) const

print technical triggers

Definition at line 449 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

Referenced by printTechnicalTrigger().

452 {
453 
454  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
455  itBx != m_gtFdlWord.end(); ++itBx) {
456 
457  if ( (*itBx).bxInEvent() == bxInEventValue ) {
458 
459  myCout << "\nL1 Global Trigger Record: " << std::endl;
460 
461  myCout << " Bunch cross " << bxInEventValue
462  << std::endl;
463 
464  (*itBx).printGtTechnicalTriggerWord(myCout);
465  }
466  }
467 
468  myCout << std::endl;
469 
470 }
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::printTechnicalTrigger ( std::ostream &  myCout) const

Definition at line 472 of file L1GlobalTriggerReadoutRecord.cc.

References printTechnicalTrigger().

473 {
474 
475  int bxInEventL1Accept = 0;
476  printTechnicalTrigger(myCout, bxInEventL1Accept);
477 
478 }
void printTechnicalTrigger(std::ostream &myCout, int bxInEventValue) const
print technical triggers
void L1GlobalTriggerReadoutRecord::reset ( void  )

clear the record

Definition at line 712 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and L1GtfeWord::reset().

713 {
714 
715  m_gtfeWord.reset();
716 
717  for (std::vector<L1GtFdlWord>::iterator itFdl = m_gtFdlWord.begin();
718  itFdl != m_gtFdlWord.end(); ++itFdl) {
719 
720  itFdl->reset();
721 
722  }
723 
724  for (std::vector<L1GtPsbWord>::iterator itPsb = m_gtPsbWord.begin();
725  itPsb != m_gtPsbWord.end(); ++itPsb) {
726 
727  itPsb->reset();
728 
729  }
730 
731  // TODO FIXME reset m_muCollRefProd
732 
733 }
virtual void reset()
reset the content of a L1GtfeWord
Definition: L1GtfeWord.cc:306
std::vector< L1GtPsbWord > m_gtPsbWord
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::setDecision ( const bool &  t,
int  bxInEventValue 
)

set global decision, decision word and technical trigger word

Definition at line 310 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecision().

311 {
312 
313  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
314  itBx != m_gtFdlWord.end(); ++itBx) {
315 
316  if ( (*itBx).bxInEvent() == bxInEventValue ) {
317 
318  // TODO FIXME when manipulating partitions
319  (*itBx).setFinalOR(static_cast<uint16_t> (t));
320  return;
321  }
322  }
323 
324  // if bunch cross not found, throw exception (action: SkipEvent)
325 
326  // throw cms::Exception("NotFound")
327  LogTrace("L1GlobalTriggerReadoutRecord")
328  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
329  << " does not exist.\n"
330  << "Can not set global decision for this bx!\n"
331  << std::endl;
332 
333 }
tuple t
Definition: tree.py:139
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setDecision ( const bool &  t)

Definition at line 336 of file L1GlobalTriggerReadoutRecord.cc.

References setDecision().

337 {
338 
339  int bxInEventL1Accept = 0;
340  setDecision(t, bxInEventL1Accept);
341 }
void setDecision(const bool &t, int bxInEventValue)
set global decision, decision word and technical trigger word
tuple t
Definition: tree.py:139
void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue,
int  bxInEventValue 
)

Definition at line 344 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecisionWord().

347 {
348 
349  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
350  itBx != m_gtFdlWord.end(); ++itBx) {
351 
352  if ( (*itBx).bxInEvent() == bxInEventValue ) {
353 
354  (*itBx).setGtDecisionWord (decisionWordValue);
355  return;
356  }
357  }
358 
359  // if bunch cross not found, throw exception (action: SkipEvent)
360 
361  // throw cms::Exception("NotFound")
362  LogTrace("L1GlobalTriggerReadoutRecord")
363  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
364  << " does not exist.\n"
365  << "Can not set decision word for this bx!\n"
366  << std::endl;
367 
368 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue)

Definition at line 370 of file L1GlobalTriggerReadoutRecord.cc.

References setDecisionWord().

372 {
373 
374  int bxInEventL1Accept = 0;
375  setDecisionWord(decisionWordValue, bxInEventL1Accept);
376 
377 }
void setDecisionWord(const DecisionWord &decisionWordValue, int bxInEventValue)
void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue,
int  bxInEventValue 
)

Definition at line 555 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

557 {
558 
559  // if a L1GtFdlWord exists for bxInEventValue, replace it
560  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
561  itBx != m_gtFdlWord.end(); ++itBx) {
562 
563  if ( (*itBx).bxInEvent() == bxInEventValue ) {
564  *itBx = gtFdlWordValue;
565  LogTrace("L1GlobalTriggerReadoutRecord")
566  << "L1GlobalTriggerReadoutRecord: replacing L1GtFdlWord for bxInEvent = "
567  << bxInEventValue << "\n"
568  << std::endl;
569  return;
570  }
571  }
572 
573  // if bunch cross not found, throw exception (action: SkipEvent)
574  // all L1GtFdlWord are created in the record constructor for allowed bunch crosses
575 
576  // throw cms::Exception("NotFound")
577  LogTrace("L1GlobalTriggerReadoutRecord")
578  << "\nError: Cannot set L1GtFdlWord for bxInEvent = " << bxInEventValue
579  << std::endl;
580 
581 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue)

Definition at line 583 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

584 {
585 
586  // just push back the new FDL block
587  m_gtFdlWord.push_back(gtFdlWordValue);
588 
589 }
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::setGtfeWord ( const L1GtfeWord gtfeWordValue)

Definition at line 516 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

517 {
518 
519  m_gtfeWord = gtfeWordValue;
520 
521 }
void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue,
cms_uint16_t  boardIdValue,
int  bxInEventValue 
)

Definition at line 631 of file L1GlobalTriggerReadoutRecord.cc.

References TauDecayModes::dec, LogTrace, and m_gtPsbWord.

Referenced by setGtPsbWord().

633 {
634 
635  // if a L1GtPsbWord with the same bxInEventValue and boardIdValue exists, replace it
636  for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin();
637  itBx != m_gtPsbWord.end(); ++itBx) {
638 
639  if (
640  ((*itBx).bxInEvent() == bxInEventValue) &&
641  ((*itBx).boardId() == boardIdValue)) {
642 
643  *itBx = gtPsbWordValue;
644 
645  LogTrace("L1GlobalTriggerReadoutRecord")
646  << "\nL1GlobalTriggerReadoutRecord: replacing L1GtPsbWord with boardId = "
647  << std::hex << boardIdValue << std::dec
648  << " and bxInEvent = " << bxInEventValue
649  << "\n"
650  << std::endl;
651  return;
652  }
653  }
654 
655  // otherwise, write in the first empty PSB
656  // empty means: PSB with bxInEvent = 0, boardId = 0
657 
658  for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin();
659  itBx != m_gtPsbWord.end(); ++itBx) {
660 
661  if (
662  ((*itBx).bxInEvent() == 0) &&
663  ((*itBx).boardId() == 0)) {
664 
665  *itBx = gtPsbWordValue;
666 
667  LogTrace("L1GlobalTriggerReadoutRecord")
668  << "\nL1GlobalTriggerReadoutRecord: filling an empty L1GtPsbWord"
669  << " for PSB with boardId = "
670  << std::hex << boardIdValue << std::dec
671  << " and bxInEvent = " << bxInEventValue
672  << "\n"
673  << std::endl;
674  return;
675  }
676  }
677 
678  // no PSB to replace, no empty PSB: throw exception (action: SkipEvent)
679  // all L1GtPsbWord are created in the record constructor
680 
681  // throw cms::Exception("NotFound")
682  LogTrace("L1GlobalTriggerReadoutRecord")
683  << "\nError: Cannot set L1GtPsbWord for PSB with boardId = "
684  << std::hex << boardIdValue << std::dec
685  << " and bxInEvent = " << bxInEventValue
686  << "\n No PSB to replace and no empty PSB found!\n"
687  << std::endl;
688 
689 
690 }
std::vector< L1GtPsbWord > m_gtPsbWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue,
cms_uint16_t  boardIdValue 
)

Definition at line 692 of file L1GlobalTriggerReadoutRecord.cc.

References setGtPsbWord().

694 {
695 
696  int bxInEventL1Accept = 0;
697  setGtPsbWord(gtPsbWordValue, boardIdValue, bxInEventL1Accept);
698 
699 }
void setGtPsbWord(const L1GtPsbWord &, cms_uint16_t boardIdValue, int bxInEventValue)
void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue)

Definition at line 701 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtPsbWord.

702 {
703  // just push back the new PSB block
704  m_gtPsbWord.push_back(gtPsbWordValue);
705 
706 }
std::vector< L1GtPsbWord > m_gtPsbWord
void L1GlobalTriggerReadoutRecord::setMuCollectionRefProd ( edm::Handle< L1MuGMTReadoutCollection > &  muHandle)

Definition at line 489 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

491 {
492 
494 
495 }
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
void L1GlobalTriggerReadoutRecord::setMuCollectionRefProd ( const edm::RefProd< L1MuGMTReadoutCollection > &  refProdMuGMT)

Definition at line 497 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

499 {
500 
501  m_muCollRefProd = refProdMuGMT;
502 
503 }
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue,
int  bxInEventValue 
)

Definition at line 379 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setTechnicalTriggerWord().

381 {
382 
383  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
384  itBx != m_gtFdlWord.end(); ++itBx) {
385 
386  if ((*itBx).bxInEvent() == bxInEventValue) {
387 
388  (*itBx).setGtTechnicalTriggerWord(ttWordValue);
389  return;
390  }
391  }
392 
393  // if bunch cross not found, throw exception (action: SkipEvent)
394 
395  // throw cms::Exception("NotFound")
396  LogTrace("L1GlobalTriggerReadoutRecord")
397  << "\nError: requested GtFdlWord for bxInEvent = "
398  << bxInEventValue << " does not exist.\n"
399  << "Can not set technical trigger word for this bx!\n" << std::endl;
400 
401 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue)

Definition at line 403 of file L1GlobalTriggerReadoutRecord.cc.

References setTechnicalTriggerWord().

405 {
406 
407  int bxInEventL1Accept = 0;
408  setTechnicalTriggerWord(ttWordValue, bxInEventL1Accept);
409 
410 }
void setTechnicalTriggerWord(const TechnicalTriggerWord &ttWordValue, int bxInEventValue)
const TechnicalTriggerWord & L1GlobalTriggerReadoutRecord::technicalTriggerWord ( int  bxInEventValue) const

Definition at line 275 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by TriggerRatesMonitor::analyze(), FWL1TriggerTableView::fillTable(), and triggerExpression::L1TechReader::operator()().

275  {
276  const static TechnicalTriggerWord emptyTechnicalTriggerWord;
277 
278  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
279  itBx != m_gtFdlWord.end(); ++itBx) {
280 
281  if ( (*itBx).bxInEvent() == bxInEventValue ) {
282  return (*itBx).gtTechnicalTriggerWord();
283  }
284  }
285 
286  // if bunch cross not found, throw exception (action: SkipEvent)
287  // TODO re-evaluate action
288 
289  // throw cms::Exception("NotFound")
290  LogTrace("L1GlobalTriggerReadoutRecord")
291  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
292  << " does not exist.\n"
293  << "Can not return technical trigger word for this bx!\n"
294  << std::endl;
295 
296  return emptyTechnicalTriggerWord;
297 }
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const TechnicalTriggerWord & L1GlobalTriggerReadoutRecord::technicalTriggerWord ( ) const

Definition at line 300 of file L1GlobalTriggerReadoutRecord.cc.

300  {
301 
302  int bxInEventL1Accept = 0;
303  return technicalTriggerWord(bxInEventL1Accept);
304 
305 }
const TechnicalTriggerWord & technicalTriggerWord() const

Friends And Related Function Documentation

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

output stream operator

Definition at line 766 of file L1GlobalTriggerReadoutRecord.cc.

767 {
768  // TODO FIXME put together all prints
769  s << "Not available yet - sorry";
770 
771  return s;
772 
773 }

Member Data Documentation

std::vector<L1GtFdlWord> L1GlobalTriggerReadoutRecord::m_gtFdlWord
private
L1GtfeWord L1GlobalTriggerReadoutRecord::m_gtfeWord
private
std::vector<L1GtPsbWord> L1GlobalTriggerReadoutRecord::m_gtPsbWord
private
edm::RefProd<L1MuGMTReadoutCollection> L1GlobalTriggerReadoutRecord::m_muCollRefProd
private