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

$Date$ $Revision$

Description: see header file.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 49 of file L1GlobalTriggerReadoutRecord.h.

Constructor & Destructor Documentation

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( )

constructors

Definition at line 32 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

33 {
34 
35  // empty GTFE
37 
38  // no FDL, no PSB
39 }
L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( int  NumberBxInEvent)

Definition at line 41 of file L1GlobalTriggerReadoutRecord.cc.

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

42 {
43 
45 
46  m_gtFdlWord.reserve(numberBxInEvent);
47  m_gtFdlWord.assign(numberBxInEvent, L1GtFdlWord());
48 
49  // min value of bxInEvent
50  int minBxInEvent = (numberBxInEvent + 1)/2 - numberBxInEvent;
51  //int maxBxInEvent = (numberBxInEvent + 1)/2 - 1; // not needed
52 
53  // matrix index [0, numberBxInEvent) -> bxInEvent [minBxInEvent, maxBxInEvent]
54  // warning: matrix index != bxInEvent
55  for (int iFdl = 0; iFdl < numberBxInEvent; ++iFdl) {
56  int iBxInEvent = minBxInEvent + iFdl;
57  m_gtFdlWord[iFdl].setBxInEvent(iBxInEvent);
58  }
59 
60  // PSBs
62  int totalNumberPsb = numberPsb*numberBxInEvent;
63 
64  m_gtPsbWord.reserve(totalNumberPsb);
65  m_gtPsbWord.assign(totalNumberPsb, L1GtPsbWord());
66 
67 
68 }
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 70 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_gtPsbWord.

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

copy constructor

Definition at line 92 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

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

destructor

Definition at line 106 of file L1GlobalTriggerReadoutRecord.cc.

107 {
108 
109  // empty now
110 
111 }

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 171 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

Definition at line 196 of file L1GlobalTriggerReadoutRecord.cc.

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

Definition at line 241 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by FWL1TriggerTableView::fillTable(), triggerExpression::L1Reader::operator()(), and HLTLevel1GTSeed::seedsL1TriggerObjectMaps().

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

Definition at line 267 of file L1GlobalTriggerReadoutRecord.cc.

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

Definition at line 205 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

Definition at line 230 of file L1GlobalTriggerReadoutRecord.cc.

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

get the vector of L1GtFdlWord

Definition at line 134 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

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

Definition at line 139 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

140  {
141  return m_gtFdlWord;
142  }
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 526 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

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

Definition at line 550 of file L1GlobalTriggerReadoutRecord.cc.

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

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

Definition at line 511 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

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

get the vector of L1GtPsbWord

Definition at line 152 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

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

Definition at line 157 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

158  {
159  return m_gtPsbWord;
160  }
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 595 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtPsbWord.

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

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

Definition at line 626 of file L1GlobalTriggerReadoutRecord.cc.

References gtPsbWord().

627 {
628 
629  int bxInEventL1Accept = 0;
630  return gtPsbWord(boardIdValue, bxInEventL1Accept);
631 }
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 485 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

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

unequal operator

Definition at line 159 of file L1GlobalTriggerReadoutRecord.cc.

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

assignment operator

Definition at line 114 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

116 {
117 
118  if ( this != &result ) {
119 
120  m_gtfeWord = result.m_gtfeWord;
121  m_gtFdlWord = result.m_gtFdlWord;
122  m_gtPsbWord = result.m_gtPsbWord;
123 
125 
126  }
127 
128  return *this;
129 
130 }
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 133 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

135 {
136 
137  if (m_gtfeWord != result.m_gtfeWord) {
138  return false;
139  }
140 
141  if (m_gtFdlWord != result.m_gtFdlWord) {
142  return false;
143  }
144 
145  if (m_gtPsbWord != result.m_gtPsbWord) {
146  return false;
147  }
148 
149  if (m_muCollRefProd != result.m_muCollRefProd) {
150  return false;
151  }
152 
153  // all members identical
154  return true;
155 
156 }
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 738 of file L1GlobalTriggerReadoutRecord.cc.

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

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

References m_gtFdlWord.

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

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

Definition at line 442 of file L1GlobalTriggerReadoutRecord.cc.

References printGtDecision().

443 {
444 
445  int bxInEventL1Accept = 0;
446  printGtDecision(myCout, bxInEventL1Accept);
447 
448 }
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 451 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

Referenced by printTechnicalTrigger().

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

Definition at line 474 of file L1GlobalTriggerReadoutRecord.cc.

References printTechnicalTrigger().

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

clear the record

Definition at line 714 of file L1GlobalTriggerReadoutRecord.cc.

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

715 {
716 
717  m_gtfeWord.reset();
718 
719  for (std::vector<L1GtFdlWord>::iterator itFdl = m_gtFdlWord.begin();
720  itFdl != m_gtFdlWord.end(); ++itFdl) {
721 
722  itFdl->reset();
723 
724  }
725 
726  for (std::vector<L1GtPsbWord>::iterator itPsb = m_gtPsbWord.begin();
727  itPsb != m_gtPsbWord.end(); ++itPsb) {
728 
729  itPsb->reset();
730 
731  }
732 
733  // TODO FIXME reset m_muCollRefProd
734 
735 }
virtual void reset()
reset the content of a L1GtfeWord
Definition: L1GtfeWord.cc:308
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 312 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecision().

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

Definition at line 338 of file L1GlobalTriggerReadoutRecord.cc.

References setDecision().

339 {
340 
341  int bxInEventL1Accept = 0;
342  setDecision(t, bxInEventL1Accept);
343 }
void setDecision(const bool &t, int bxInEventValue)
set global decision, decision word and technical trigger word
void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue,
int  bxInEventValue 
)

Definition at line 346 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecisionWord().

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

Definition at line 372 of file L1GlobalTriggerReadoutRecord.cc.

References setDecisionWord().

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

Definition at line 557 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

Definition at line 585 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

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

Definition at line 518 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

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

Definition at line 633 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtPsbWord.

Referenced by setGtPsbWord().

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

Definition at line 694 of file L1GlobalTriggerReadoutRecord.cc.

References setGtPsbWord().

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

Definition at line 703 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtPsbWord.

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

Definition at line 491 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

493 {
494 
496 
497 }
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
void L1GlobalTriggerReadoutRecord::setMuCollectionRefProd ( const edm::RefProd< L1MuGMTReadoutCollection > &  refProdMuGMT)

Definition at line 499 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

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

Definition at line 381 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setTechnicalTriggerWord().

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

Definition at line 405 of file L1GlobalTriggerReadoutRecord.cc.

References setTechnicalTriggerWord().

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

Definition at line 277 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

277  {
278  static TechnicalTriggerWord emptyTechnicalTriggerWord;
279 
280  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
281  itBx != m_gtFdlWord.end(); ++itBx) {
282 
283  if ( (*itBx).bxInEvent() == bxInEventValue ) {
284  return (*itBx).gtTechnicalTriggerWord();
285  }
286  }
287 
288  // if bunch cross not found, throw exception (action: SkipEvent)
289  // TODO re-evaluate action
290 
291  // throw cms::Exception("NotFound")
292  LogTrace("L1GlobalTriggerReadoutRecord")
293  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
294  << " does not exist.\n"
295  << "Can not return technical trigger word for this bx!\n"
296  << std::endl;
297 
298  return emptyTechnicalTriggerWord;
299 }
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 302 of file L1GlobalTriggerReadoutRecord.cc.

302  {
303 
304  int bxInEventL1Accept = 0;
305  return technicalTriggerWord(bxInEventL1Accept);
306 
307 }
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 768 of file L1GlobalTriggerReadoutRecord.cc.

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

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