48 int minBxInEvent = (numberBxInEvent + 1)/2 - numberBxInEvent;
53 for (
int iFdl = 0; iFdl < numberBxInEvent; ++iFdl) {
54 int iBxInEvent = minBxInEvent + iFdl;
60 int totalNumberPsb = numberPsb*numberBxInEvent;
69 const int numberBxInEvent,
70 const int numberFdlBoards,
71 const int numberPsbBoards)
78 if (numberFdlBoards > 0) {
83 if (numberPsbBoards > 0) {
84 m_gtPsbWord.reserve(numberPsbBoards*numberBxInEvent);
116 if (
this != &result ) {
161 return !( result == *
this);
172 for (std::vector<L1GtFdlWord>::const_iterator itBx =
m_gtFdlWord.begin();
175 if ( (*itBx).bxInEvent() == bxInEventValue ) {
176 return (*itBx).finalOR();
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" 197 int bxInEventL1Accept = 0;
206 for (std::vector<L1GtFdlWord>::const_iterator itBx =
m_gtFdlWord.begin();
209 if ( (*itBx).bxInEvent() == bxInEventValue ) {
210 return (*itBx).finalOR();
218 LogTrace(
"L1GlobalTriggerReadoutRecord")
219 <<
"\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
220 <<
" does not exist.\n" 221 <<
"Can not return finalOR for this bx!\n" 231 int bxInEventL1Accept = 0;
232 return finalOR(bxInEventL1Accept);
243 for (std::vector<L1GtFdlWord>::const_iterator itBx =
m_gtFdlWord.begin();
246 if ( (*itBx).bxInEvent() == bxInEventValue ) {
247 return (*itBx).gtDecisionWord();
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" 261 return emptyDecisionWord;
268 int bxInEventL1Accept = 0;
278 for (std::vector<L1GtFdlWord>::const_iterator itBx =
m_gtFdlWord.begin();
281 if ( (*itBx).bxInEvent() == bxInEventValue ) {
282 return (*itBx).gtTechnicalTriggerWord();
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" 296 return emptyTechnicalTriggerWord;
302 int bxInEventL1Accept = 0;
313 for (std::vector<L1GtFdlWord>::iterator itBx =
m_gtFdlWord.begin();
316 if ( (*itBx).bxInEvent() == bxInEventValue ) {
319 (*itBx).setFinalOR(static_cast<uint16_t> (t));
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" 339 int bxInEventL1Accept = 0;
349 for (std::vector<L1GtFdlWord>::iterator itBx =
m_gtFdlWord.begin();
352 if ( (*itBx).bxInEvent() == bxInEventValue ) {
354 (*itBx).setGtDecisionWord (decisionWordValue);
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" 374 int bxInEventL1Accept = 0;
383 for (std::vector<L1GtFdlWord>::iterator itBx =
m_gtFdlWord.begin();
386 if ((*itBx).bxInEvent() == bxInEventValue) {
388 (*itBx).setGtTechnicalTriggerWord(ttWordValue);
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;
407 int bxInEventL1Accept = 0;
416 std::ostream& myCout,
int bxInEventValue)
const 419 for (std::vector<L1GtFdlWord>::const_iterator itBx =
m_gtFdlWord.begin();
422 if ( (*itBx).bxInEvent() == bxInEventValue ) {
424 myCout <<
"\nL1 Global Trigger Record: " << std::endl;
426 myCout <<
" Bunch cross " << bxInEventValue
428 <<
" Global Decision = " << std::setw(5) << (*itBx).globalDecision()
431 (*itBx).printGtDecisionWord(myCout);
443 int bxInEventL1Accept = 0;
450 std::ostream& myCout,
int bxInEventValue
454 for (std::vector<L1GtFdlWord>::const_iterator itBx =
m_gtFdlWord.begin();
457 if ( (*itBx).bxInEvent() == bxInEventValue ) {
459 myCout <<
"\nL1 Global Trigger Record: " << std::endl;
461 myCout <<
" Bunch cross " << bxInEventValue
464 (*itBx).printGtTechnicalTriggerWord(myCout);
475 int bxInEventL1Accept = 0;
527 for (std::vector<L1GtFdlWord>::const_iterator itBx =
m_gtFdlWord.begin();
530 if ( (*itBx).bxInEvent() == bxInEventValue ) {
538 LogTrace(
"L1GlobalTriggerReadoutRecord")
539 <<
"\nError: requested L1GtFdlWord for bxInEvent = " << bxInEventValue
540 <<
" does not exist.\n" 551 int bxInEventL1Accept = 0;
556 const L1GtFdlWord& gtFdlWordValue,
int bxInEventValue)
560 for (std::vector<L1GtFdlWord>::iterator itBx =
m_gtFdlWord.begin();
563 if ( (*itBx).bxInEvent() == bxInEventValue ) {
564 *itBx = gtFdlWordValue;
565 LogTrace(
"L1GlobalTriggerReadoutRecord")
566 <<
"L1GlobalTriggerReadoutRecord: replacing L1GtFdlWord for bxInEvent = " 567 << bxInEventValue <<
"\n" 577 LogTrace(
"L1GlobalTriggerReadoutRecord")
578 <<
"\nError: Cannot set L1GtFdlWord for bxInEvent = " << bxInEventValue
597 for (std::vector<L1GtPsbWord>::const_iterator itBx =
m_gtPsbWord.begin();
601 ((*itBx).bxInEvent() == bxInEventValue) &&
602 ((*itBx).boardId() == boardIdValue)) {
612 LogTrace(
"L1GlobalTriggerReadoutRecord")
613 <<
"\nError: requested L1GtPsbWord for boardId = " 614 << std::hex << boardIdValue <<
std::dec 615 <<
" and bxInEvent = " << bxInEventValue
616 <<
" does not exist.\n" 627 int bxInEventL1Accept = 0;
628 return gtPsbWord(boardIdValue, bxInEventL1Accept);
636 for (std::vector<L1GtPsbWord>::iterator itBx =
m_gtPsbWord.begin();
640 ((*itBx).bxInEvent() == bxInEventValue) &&
641 ((*itBx).boardId() == boardIdValue)) {
643 *itBx = gtPsbWordValue;
645 LogTrace(
"L1GlobalTriggerReadoutRecord")
646 <<
"\nL1GlobalTriggerReadoutRecord: replacing L1GtPsbWord with boardId = " 647 << std::hex << boardIdValue <<
std::dec 648 <<
" and bxInEvent = " << bxInEventValue
658 for (std::vector<L1GtPsbWord>::iterator itBx =
m_gtPsbWord.begin();
662 ((*itBx).bxInEvent() == 0) &&
663 ((*itBx).boardId() == 0)) {
665 *itBx = gtPsbWordValue;
667 LogTrace(
"L1GlobalTriggerReadoutRecord")
668 <<
"\nL1GlobalTriggerReadoutRecord: filling an empty L1GtPsbWord" 669 <<
" for PSB with boardId = " 670 << std::hex << boardIdValue <<
std::dec 671 <<
" and bxInEvent = " << bxInEventValue
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" 696 int bxInEventL1Accept = 0;
697 setGtPsbWord(gtPsbWordValue, boardIdValue, bxInEventL1Accept);
717 for (std::vector<L1GtFdlWord>::iterator itFdl =
m_gtFdlWord.begin();
724 for (std::vector<L1GtPsbWord>::iterator itPsb =
m_gtPsbWord.begin();
739 myCout <<
"\n L1GlobalTriggerReadoutRecord::print \n" << std::endl;
743 for (std::vector<L1GtFdlWord>::const_iterator itFdl =
m_gtFdlWord.begin();
746 itFdl->print(myCout);
750 for (std::vector<L1GtPsbWord>::const_iterator itPsb =
m_gtPsbWord.begin();
753 itPsb->print(myCout);
769 s <<
"Not available yet - sorry";
void setGtfeWord(const L1GtfeWord &)
void setDecision(const bool &t, int bxInEventValue)
set global decision, decision word and technical trigger word
void print(std::ostream &myCout) const
pretty print the content of a L1GlobalTriggerReadoutRecord
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeWord
const DecisionWord & decisionWord() const
const L1GtfeWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
void setMuCollectionRefProd(edm::Handle< L1MuGMTReadoutCollection > &)
bool operator==(const L1GlobalTriggerReadoutRecord &) const
equal operator
static const int NumberPsbBoards
number of PSB boards in GT
void printGtDecision(std::ostream &myCout, int bxInEventValue) const
print global decision and algorithm decision word
void setGtFdlWord(const L1GtFdlWord &, int bxInEventValue)
virtual void reset()
reset the content of a L1GtfeWord
std::vector< L1GtPsbWord > m_gtPsbWord
void setDecisionWord(const DecisionWord &decisionWordValue, int bxInEventValue)
std::vector< bool > DecisionWord
typedefs
void setTechnicalTriggerWord(const TechnicalTriggerWord &ttWordValue, int bxInEventValue)
friend std::ostream & operator<<(std::ostream &, const L1GlobalTriggerReadoutRecord &)
output stream operator
L1GlobalTriggerReadoutRecord()
constructors
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
unsigned short cms_uint16_t
const L1GtFdlWord gtFdlWord() const
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
void reset()
clear the record
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
std::vector< L1GtFdlWord > m_gtFdlWord
const edm::RefProd< L1MuGMTReadoutCollection > muCollectionRefProd() const
get / set reference to L1MuGMTReadoutCollection
const bool decision() const
const cms_uint16_t finalOR() const
void setGtPsbWord(const L1GtPsbWord &, cms_uint16_t boardIdValue, int bxInEventValue)
virtual ~L1GlobalTriggerReadoutRecord()
destructor
const TechnicalTriggerWord & technicalTriggerWord() const
bool operator!=(const L1GlobalTriggerReadoutRecord &) const
unequal operator
void printTechnicalTrigger(std::ostream &myCout, int bxInEventValue) const
print technical triggers
L1GlobalTriggerReadoutRecord & operator=(const L1GlobalTriggerReadoutRecord &)
assignment operator