CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
L1GlobalTriggerReadoutRecord Class Reference

#include <L1GlobalTriggerReadoutRecord.h>

Public Member Functions

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

Private Attributes

std::vector< L1GtFdlWordm_gtFdlWord
 
L1GtfeWord m_gtfeWord
 
std::vector< L1GtPsbWordm_gtPsbWord
 
edm::RefProd< L1MuGMTReadoutCollectionm_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 46 of file L1GlobalTriggerReadoutRecord.h.

Constructor & Destructor Documentation

◆ L1GlobalTriggerReadoutRecord() [1/4]

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( )

constructors

Definition at line 26 of file L1GlobalTriggerReadoutRecord.cc.

26  {
27  // empty GTFE
29 
30  // no FDL, no PSB
31 }

References m_gtfeWord.

◆ L1GlobalTriggerReadoutRecord() [2/4]

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( int  NumberBxInEvent)

Definition at line 33 of file L1GlobalTriggerReadoutRecord.cc.

33  {
35 
36  m_gtFdlWord.reserve(numberBxInEvent);
37  m_gtFdlWord.assign(numberBxInEvent, L1GtFdlWord());
38 
39  // min value of bxInEvent
40  int minBxInEvent = (numberBxInEvent + 1) / 2 - numberBxInEvent;
41  //int maxBxInEvent = (numberBxInEvent + 1)/2 - 1; // not needed
42 
43  // matrix index [0, numberBxInEvent) -> bxInEvent [minBxInEvent, maxBxInEvent]
44  // warning: matrix index != bxInEvent
45  for (int iFdl = 0; iFdl < numberBxInEvent; ++iFdl) {
46  int iBxInEvent = minBxInEvent + iFdl;
47  m_gtFdlWord[iFdl].setBxInEvent(iBxInEvent);
48  }
49 
50  // PSBs
52  int totalNumberPsb = numberPsb * numberBxInEvent;
53 
54  m_gtPsbWord.reserve(totalNumberPsb);
55  m_gtPsbWord.assign(totalNumberPsb, L1GtPsbWord());
56 }

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

◆ L1GlobalTriggerReadoutRecord() [3/4]

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( const int  numberBxInEvent,
const int  numberFdlBoards,
const int  numberPsbBoards 
)

Definition at line 58 of file L1GlobalTriggerReadoutRecord.cc.

60  {
61  // GTFE board
63 
64  // FDL board
65  if (numberFdlBoards > 0) {
66  m_gtFdlWord.reserve(numberBxInEvent);
67  }
68 
69  // PSB boards
70  if (numberPsbBoards > 0) {
71  m_gtPsbWord.reserve(numberPsbBoards * numberBxInEvent);
72  }
73 }

References m_gtFdlWord, m_gtfeWord, and m_gtPsbWord.

◆ L1GlobalTriggerReadoutRecord() [4/4]

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( const L1GlobalTriggerReadoutRecord result)

copy constructor

Definition at line 76 of file L1GlobalTriggerReadoutRecord.cc.

76  {
77  m_gtfeWord = result.m_gtfeWord;
78  m_gtFdlWord = result.m_gtFdlWord;
79  m_gtPsbWord = result.m_gtPsbWord;
80 
81  m_muCollRefProd = result.m_muCollRefProd;
82 }

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, m_muCollRefProd, and mps_fire::result.

◆ ~L1GlobalTriggerReadoutRecord()

L1GlobalTriggerReadoutRecord::~L1GlobalTriggerReadoutRecord ( )
virtual

destructor

Definition at line 85 of file L1GlobalTriggerReadoutRecord.cc.

85  {
86  // empty now
87 }

Member Function Documentation

◆ decision() [1/2]

const bool L1GlobalTriggerReadoutRecord::decision ( ) const

Definition at line 152 of file L1GlobalTriggerReadoutRecord.cc.

152  {
153  int bxInEventL1Accept = 0;
154  return decision(bxInEventL1Accept);
155 }

◆ decision() [2/2]

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

132  {
133  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
134  if ((*itBx).bxInEvent() == bxInEventValue) {
135  return (*itBx).finalOR();
136  }
137  }
138 
139  // if bunch cross not found, throw exception (action: SkipEvent)
140  // TODO re-evaluate action
141 
142  // throw cms::Exception("NotFound")
143  LogTrace("L1GlobalTriggerReadoutRecord")
144  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
145  << "Can not return global decision for this bx!\n"
146  << std::endl;
147 
148  return false;
149 }

References LogTrace, and m_gtFdlWord.

Referenced by L1GtAnalyzer::analyzeDecisionReadoutRecord(), and L1Filter::filter().

◆ decisionWord() [1/2]

const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( ) const

Definition at line 207 of file L1GlobalTriggerReadoutRecord.cc.

207  {
208  int bxInEventL1Accept = 0;
209  return decisionWord(bxInEventL1Accept);
210 }

◆ decisionWord() [2/2]

const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( int  bxInEventValue) const

Definition at line 186 of file L1GlobalTriggerReadoutRecord.cc.

186  {
187  const static DecisionWord emptyDecisionWord;
188 
189  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
190  if ((*itBx).bxInEvent() == bxInEventValue) {
191  return (*itBx).gtDecisionWord();
192  }
193  }
194 
195  // if bunch cross not found, throw exception (action: SkipEvent)
196  // TODO re-evaluate action
197 
198  // throw cms::Exception("NotFound")
199  LogTrace("L1GlobalTriggerReadoutRecord")
200  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
201  << "Can not return decision word for this bx!\n"
202  << std::endl;
203 
204  return emptyDecisionWord;
205 }

References LogTrace, and m_gtFdlWord.

Referenced by L1Scalers::analyze(), BxTiming::analyze(), EcalTPGAnalyzer::analyze(), L1GtTrigReport::analyze(), L1TdeRCT::analyze(), L1TGT::analyze(), IsolatedGenParticles::analyze(), L1GtAnalyzer::analyzeDecisionReadoutRecord(), ecaldqm::ClusterTask::beginEvent(), L1BitComputer::compute(), EcalCosmicsHists::determineTriggers(), FWL1TriggerTableView::fillTable(), L1Filter::filter(), HLTLevel1Pattern::filter(), EcalExclusiveTrigFilter::filter(), L1GtUtils::l1Results(), ShallowEventDataProducer::produce(), L1GlobalTriggerRecordProducer::produce(), L1TriggerResultsConverter::produce(), HLTLevel1GTSeed::seedsL1TriggerObjectMaps(), and L1Analysis::L1AnalysisGT::Set().

◆ finalOR() [1/2]

const cms_uint16_t L1GlobalTriggerReadoutRecord::finalOR ( ) const

Definition at line 179 of file L1GlobalTriggerReadoutRecord.cc.

179  {
180  int bxInEventL1Accept = 0;
181  return finalOR(bxInEventL1Accept);
182 }

◆ finalOR() [2/2]

const cms_uint16_t L1GlobalTriggerReadoutRecord::finalOR ( int  bxInEventValue) const

Definition at line 159 of file L1GlobalTriggerReadoutRecord.cc.

159  {
160  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
161  if ((*itBx).bxInEvent() == bxInEventValue) {
162  return (*itBx).finalOR();
163  }
164  }
165 
166  // if bunch cross not found, throw exception (action: SkipEvent)
167  // TODO re-evaluate action
168 
169  // throw cms::Exception("NotFound")
170  LogTrace("L1GlobalTriggerReadoutRecord")
171  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
172  << "Can not return finalOR for this bx!\n"
173  << std::endl;
174 
175  return 0;
176 }

References LogTrace, and m_gtFdlWord.

Referenced by L1GtTrigReport::analyze(), HLTLevel1GTSeed::hltFilter(), and L1GlobalTriggerRecordProducer::produce().

◆ gtFdlVector() [1/2]

std::vector<L1GtFdlWord>& L1GlobalTriggerReadoutRecord::gtFdlVector ( )
inline

Definition at line 121 of file L1GlobalTriggerReadoutRecord.h.

121 { return m_gtFdlWord; }

References m_gtFdlWord.

◆ gtFdlVector() [2/2]

const std::vector<L1GtFdlWord> L1GlobalTriggerReadoutRecord::gtFdlVector ( ) const
inline

◆ gtFdlWord() [1/2]

const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( ) const

Definition at line 390 of file L1GlobalTriggerReadoutRecord.cc.

390  {
391  int bxInEventL1Accept = 0;
392  return gtFdlWord(bxInEventL1Accept);
393 }

◆ gtFdlWord() [2/2]

const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( int  bxInEventValue) const

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

Definition at line 372 of file L1GlobalTriggerReadoutRecord.cc.

372  {
373  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
374  if ((*itBx).bxInEvent() == bxInEventValue) {
375  return (*itBx);
376  }
377  }
378 
379  // if bunch cross not found, throw exception (action: SkipEvent)
380 
381  // throw cms::Exception("NotFound")
382  LogTrace("L1GlobalTriggerReadoutRecord")
383  << "\nError: requested L1GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
384  << std::endl;
385 
386  // return empty record - actually does not arrive here
387  return L1GtFdlWord();
388 }

References LogTrace, and m_gtFdlWord.

Referenced by TriggerHelper::acceptGtLogicalExpression(), GenericTriggerEventFlag::acceptGtLogicalExpression(), L1GtTrigReport::analyze(), L1TGT::analyze(), TrackerDpgAnalysis::analyze(), FWL1TriggerTableView::fillTable(), HLTPhysicsDeclared::filter(), PhysDecl::filter(), HLTPrescaler::filter(), L1GtUtils::l1Results(), L1GtUtils::prescaleFactorSetIndex(), L1GlobalTriggerRecordProducer::produce(), L1GTDigiToRaw::produce(), pat::PATTriggerEventProducer::produce(), and L1Analysis::L1AnalysisGT::Set().

◆ gtfeWord()

const L1GtfeWord L1GlobalTriggerReadoutRecord::gtfeWord ( ) const

◆ gtPsbVector() [1/2]

std::vector<L1GtPsbWord>& L1GlobalTriggerReadoutRecord::gtPsbVector ( )
inline

Definition at line 133 of file L1GlobalTriggerReadoutRecord.h.

133 { return m_gtPsbWord; }

References m_gtPsbWord.

◆ gtPsbVector() [2/2]

const std::vector<L1GtPsbWord> L1GlobalTriggerReadoutRecord::gtPsbVector ( ) const
inline

◆ gtPsbWord() [1/2]

const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( cms_uint16_t  boardIdValue) const

Definition at line 440 of file L1GlobalTriggerReadoutRecord.cc.

440  {
441  int bxInEventL1Accept = 0;
442  return gtPsbWord(boardIdValue, bxInEventL1Accept);
443 }

References gtPsbWord().

◆ gtPsbWord() [2/2]

const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( cms_uint16_t  boardIdValue,
int  bxInEventValue 
) const

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

Definition at line 421 of file L1GlobalTriggerReadoutRecord.cc.

421  {
422  for (std::vector<L1GtPsbWord>::const_iterator itBx = m_gtPsbWord.begin(); itBx != m_gtPsbWord.end(); ++itBx) {
423  if (((*itBx).bxInEvent() == bxInEventValue) && ((*itBx).boardId() == boardIdValue)) {
424  return (*itBx);
425  }
426  }
427 
428  // if bunch cross or boardId not found, throw exception (action: SkipEvent)
429 
430  // throw cms::Exception("NotFound")
431  LogTrace("L1GlobalTriggerReadoutRecord")
432  << "\nError: requested L1GtPsbWord for boardId = " << std::hex << boardIdValue << std::dec
433  << " and bxInEvent = " << bxInEventValue << " does not exist.\n"
434  << std::endl;
435 
436  // return empty record - actually does not arrive here
437  return L1GtPsbWord();
438 }

References TauDecayModes::dec, LogTrace, and m_gtPsbWord.

Referenced by L1TGT::analyze(), ecaldqm::ClusterTask::beginEvent(), EcalCosmicsHists::determineTriggers(), EcalExclusiveTrigFilter::filter(), gtPsbWord(), L1GTDigiToRaw::produce(), and L1Analysis::L1AnalysisGT::Set().

◆ muCollectionRefProd()

const edm::RefProd< L1MuGMTReadoutCollection > L1GlobalTriggerReadoutRecord::muCollectionRefProd ( ) const

get / set reference to L1MuGMTReadoutCollection

Definition at line 352 of file L1GlobalTriggerReadoutRecord.cc.

352  {
353  return m_muCollRefProd;
354 }

References m_muCollRefProd.

Referenced by L1GtPackUnpackAnalyzer::analyzeGT().

◆ operator!=()

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

unequal operator

Definition at line 125 of file L1GlobalTriggerReadoutRecord.cc.

125  {
126  return !(result == *this);
127 }

References mps_fire::result.

◆ operator=()

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

assignment operator

Definition at line 90 of file L1GlobalTriggerReadoutRecord.cc.

90  {
91  if (this != &result) {
92  m_gtfeWord = result.m_gtfeWord;
93  m_gtFdlWord = result.m_gtFdlWord;
94  m_gtPsbWord = result.m_gtPsbWord;
95 
96  m_muCollRefProd = result.m_muCollRefProd;
97  }
98 
99  return *this;
100 }

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, m_muCollRefProd, and mps_fire::result.

◆ operator==()

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

equal operator

Definition at line 103 of file L1GlobalTriggerReadoutRecord.cc.

103  {
104  if (m_gtfeWord != result.m_gtfeWord) {
105  return false;
106  }
107 
108  if (m_gtFdlWord != result.m_gtFdlWord) {
109  return false;
110  }
111 
112  if (m_gtPsbWord != result.m_gtPsbWord) {
113  return false;
114  }
115 
116  if (m_muCollRefProd != result.m_muCollRefProd) {
117  return false;
118  }
119 
120  // all members identical
121  return true;
122 }

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, m_muCollRefProd, and mps_fire::result.

◆ print()

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

pretty print the content of a L1GlobalTriggerReadoutRecord

Definition at line 515 of file L1GlobalTriggerReadoutRecord.cc.

515  {
516  myCout << "\n L1GlobalTriggerReadoutRecord::print \n" << std::endl;
517 
518  m_gtfeWord.print(myCout);
519 
520  for (std::vector<L1GtFdlWord>::const_iterator itFdl = m_gtFdlWord.begin(); itFdl != m_gtFdlWord.end(); ++itFdl) {
521  itFdl->print(myCout);
522  }
523 
524  for (std::vector<L1GtPsbWord>::const_iterator itPsb = m_gtPsbWord.begin(); itPsb != m_gtPsbWord.end(); ++itPsb) {
525  itPsb->print(myCout);
526  }
527 
528  // FIXME add L1MuGMTReadoutCollection printing
529  // edm::RefProd<L1MuGMTReadoutCollection> m_muCollRefProd;
530 }

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

Referenced by L1GTDigiToRaw::produce().

◆ printGtDecision() [1/2]

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

Definition at line 326 of file L1GlobalTriggerReadoutRecord.cc.

326  {
327  int bxInEventL1Accept = 0;
328  printGtDecision(myCout, bxInEventL1Accept);
329 }

References printGtDecision().

◆ printGtDecision() [2/2]

void L1GlobalTriggerReadoutRecord::printGtDecision ( std::ostream &  myCout,
int  bxInEventValue 
) const

print global decision and algorithm decision word

Definition at line 311 of file L1GlobalTriggerReadoutRecord.cc.

311  {
312  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
313  if ((*itBx).bxInEvent() == bxInEventValue) {
314  myCout << "\nL1 Global Trigger Record: " << std::endl;
315 
316  myCout << " Bunch cross " << bxInEventValue << std::endl
317  << " Global Decision = " << std::setw(5) << (*itBx).globalDecision() << std::endl;
318 
319  (*itBx).printGtDecisionWord(myCout);
320  }
321  }
322 
323  myCout << std::endl;
324 }

References m_gtFdlWord.

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

◆ printTechnicalTrigger() [1/2]

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

Definition at line 346 of file L1GlobalTriggerReadoutRecord.cc.

346  {
347  int bxInEventL1Accept = 0;
348  printTechnicalTrigger(myCout, bxInEventL1Accept);
349 }

References printTechnicalTrigger().

◆ printTechnicalTrigger() [2/2]

void L1GlobalTriggerReadoutRecord::printTechnicalTrigger ( std::ostream &  myCout,
int  bxInEventValue 
) const

print technical triggers

Definition at line 332 of file L1GlobalTriggerReadoutRecord.cc.

332  {
333  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
334  if ((*itBx).bxInEvent() == bxInEventValue) {
335  myCout << "\nL1 Global Trigger Record: " << std::endl;
336 
337  myCout << " Bunch cross " << bxInEventValue << std::endl;
338 
339  (*itBx).printGtTechnicalTriggerWord(myCout);
340  }
341  }
342 
343  myCout << std::endl;
344 }

References m_gtFdlWord.

Referenced by L1GtAnalyzer::analyzeDecisionReadoutRecord(), and printTechnicalTrigger().

◆ reset()

void L1GlobalTriggerReadoutRecord::reset ( void  )

clear the record

Definition at line 500 of file L1GlobalTriggerReadoutRecord.cc.

500  {
501  m_gtfeWord.reset();
502 
503  for (std::vector<L1GtFdlWord>::iterator itFdl = m_gtFdlWord.begin(); itFdl != m_gtFdlWord.end(); ++itFdl) {
504  itFdl->reset();
505  }
506 
507  for (std::vector<L1GtPsbWord>::iterator itPsb = m_gtPsbWord.begin(); itPsb != m_gtPsbWord.end(); ++itPsb) {
508  itPsb->reset();
509  }
510 
511  // TODO FIXME reset m_muCollRefProd
512 }

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

◆ setDecision() [1/2]

void L1GlobalTriggerReadoutRecord::setDecision ( const bool &  t)

Definition at line 259 of file L1GlobalTriggerReadoutRecord.cc.

259  {
260  int bxInEventL1Accept = 0;
261  setDecision(t, bxInEventL1Accept);
262 }

References setDecision(), and submitPVValidationJobs::t.

◆ setDecision() [2/2]

void L1GlobalTriggerReadoutRecord::setDecision ( const bool &  t,
int  bxInEventValue 
)

set global decision, decision word and technical trigger word

Definition at line 240 of file L1GlobalTriggerReadoutRecord.cc.

240  {
241  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
242  if ((*itBx).bxInEvent() == bxInEventValue) {
243  // TODO FIXME when manipulating partitions
244  (*itBx).setFinalOR(static_cast<uint16_t>(t));
245  return;
246  }
247  }
248 
249  // if bunch cross not found, throw exception (action: SkipEvent)
250 
251  // throw cms::Exception("NotFound")
252  LogTrace("L1GlobalTriggerReadoutRecord")
253  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
254  << "Can not set global decision for this bx!\n"
255  << std::endl;
256 }

References LogTrace, m_gtFdlWord, and submitPVValidationJobs::t.

Referenced by setDecision().

◆ setDecisionWord() [1/2]

void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue)

Definition at line 282 of file L1GlobalTriggerReadoutRecord.cc.

282  {
283  int bxInEventL1Accept = 0;
284  setDecisionWord(decisionWordValue, bxInEventL1Accept);
285 }

References setDecisionWord().

◆ setDecisionWord() [2/2]

void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue,
int  bxInEventValue 
)

Definition at line 265 of file L1GlobalTriggerReadoutRecord.cc.

265  {
266  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
267  if ((*itBx).bxInEvent() == bxInEventValue) {
268  (*itBx).setGtDecisionWord(decisionWordValue);
269  return;
270  }
271  }
272 
273  // if bunch cross not found, throw exception (action: SkipEvent)
274 
275  // throw cms::Exception("NotFound")
276  LogTrace("L1GlobalTriggerReadoutRecord")
277  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
278  << "Can not set decision word for this bx!\n"
279  << std::endl;
280 }

References LogTrace, and m_gtFdlWord.

Referenced by setDecisionWord().

◆ setGtFdlWord() [1/2]

void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue)

Definition at line 415 of file L1GlobalTriggerReadoutRecord.cc.

415  {
416  // just push back the new FDL block
417  m_gtFdlWord.push_back(gtFdlWordValue);
418 }

References m_gtFdlWord.

◆ setGtFdlWord() [2/2]

void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue,
int  bxInEventValue 
)

Definition at line 395 of file L1GlobalTriggerReadoutRecord.cc.

395  {
396  // if a L1GtFdlWord exists for bxInEventValue, replace it
397  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
398  if ((*itBx).bxInEvent() == bxInEventValue) {
399  *itBx = gtFdlWordValue;
400  LogTrace("L1GlobalTriggerReadoutRecord")
401  << "L1GlobalTriggerReadoutRecord: replacing L1GtFdlWord for bxInEvent = " << bxInEventValue << "\n"
402  << std::endl;
403  return;
404  }
405  }
406 
407  // if bunch cross not found, throw exception (action: SkipEvent)
408  // all L1GtFdlWord are created in the record constructor for allowed bunch crosses
409 
410  // throw cms::Exception("NotFound")
411  LogTrace("L1GlobalTriggerReadoutRecord")
412  << "\nError: Cannot set L1GtFdlWord for bxInEvent = " << bxInEventValue << std::endl;
413 }

References LogTrace, and m_gtFdlWord.

Referenced by L1GlobalTriggerFDL::fillDaqFdlBlock().

◆ setGtfeWord()

void L1GlobalTriggerReadoutRecord::setGtfeWord ( const L1GtfeWord gtfeWordValue)

Definition at line 369 of file L1GlobalTriggerReadoutRecord.cc.

369 { m_gtfeWord = gtfeWordValue; }

References m_gtfeWord.

◆ setGtPsbWord() [1/3]

void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue,
cms_uint16_t  boardIdValue 
)

Definition at line 486 of file L1GlobalTriggerReadoutRecord.cc.

486  {
487  int bxInEventL1Accept = 0;
488  setGtPsbWord(gtPsbWordValue, boardIdValue, bxInEventL1Accept);
489 }

References setGtPsbWord().

◆ setGtPsbWord() [2/3]

void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue,
cms_uint16_t  boardIdValue,
int  bxInEventValue 
)

Definition at line 445 of file L1GlobalTriggerReadoutRecord.cc.

447  {
448  // if a L1GtPsbWord with the same bxInEventValue and boardIdValue exists, replace it
449  for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin(); itBx != m_gtPsbWord.end(); ++itBx) {
450  if (((*itBx).bxInEvent() == bxInEventValue) && ((*itBx).boardId() == boardIdValue)) {
451  *itBx = gtPsbWordValue;
452 
453  LogTrace("L1GlobalTriggerReadoutRecord")
454  << "\nL1GlobalTriggerReadoutRecord: replacing L1GtPsbWord with boardId = " << std::hex << boardIdValue
455  << std::dec << " and bxInEvent = " << bxInEventValue << "\n"
456  << std::endl;
457  return;
458  }
459  }
460 
461  // otherwise, write in the first empty PSB
462  // empty means: PSB with bxInEvent = 0, boardId = 0
463 
464  for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin(); itBx != m_gtPsbWord.end(); ++itBx) {
465  if (((*itBx).bxInEvent() == 0) && ((*itBx).boardId() == 0)) {
466  *itBx = gtPsbWordValue;
467 
468  LogTrace("L1GlobalTriggerReadoutRecord") << "\nL1GlobalTriggerReadoutRecord: filling an empty L1GtPsbWord"
469  << " for PSB with boardId = " << std::hex << boardIdValue << std::dec
470  << " and bxInEvent = " << bxInEventValue << "\n"
471  << std::endl;
472  return;
473  }
474  }
475 
476  // no PSB to replace, no empty PSB: throw exception (action: SkipEvent)
477  // all L1GtPsbWord are created in the record constructor
478 
479  // throw cms::Exception("NotFound")
480  LogTrace("L1GlobalTriggerReadoutRecord")
481  << "\nError: Cannot set L1GtPsbWord for PSB with boardId = " << std::hex << boardIdValue << std::dec
482  << " and bxInEvent = " << bxInEventValue << "\n No PSB to replace and no empty PSB found!\n"
483  << std::endl;
484 }

References TauDecayModes::dec, LogTrace, and m_gtPsbWord.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and setGtPsbWord().

◆ setGtPsbWord() [3/3]

void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue)

Definition at line 491 of file L1GlobalTriggerReadoutRecord.cc.

491  {
492  // just push back the new PSB block
493  m_gtPsbWord.push_back(gtPsbWordValue);
494 }

References m_gtPsbWord.

◆ setMuCollectionRefProd() [1/2]

void L1GlobalTriggerReadoutRecord::setMuCollectionRefProd ( const edm::RefProd< L1MuGMTReadoutCollection > &  refProdMuGMT)

Definition at line 360 of file L1GlobalTriggerReadoutRecord.cc.

360  {
361  m_muCollRefProd = refProdMuGMT;
362 }

References m_muCollRefProd.

◆ setMuCollectionRefProd() [2/2]

void L1GlobalTriggerReadoutRecord::setMuCollectionRefProd ( edm::Handle< L1MuGMTReadoutCollection > &  muHandle)

Definition at line 356 of file L1GlobalTriggerReadoutRecord.cc.

356  {
358 }

References m_muCollRefProd.

◆ setTechnicalTriggerWord() [1/2]

void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue)

Definition at line 305 of file L1GlobalTriggerReadoutRecord.cc.

305  {
306  int bxInEventL1Accept = 0;
307  setTechnicalTriggerWord(ttWordValue, bxInEventL1Accept);
308 }

References setTechnicalTriggerWord().

◆ setTechnicalTriggerWord() [2/2]

void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue,
int  bxInEventValue 
)

Definition at line 287 of file L1GlobalTriggerReadoutRecord.cc.

288  {
289  for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
290  if ((*itBx).bxInEvent() == bxInEventValue) {
291  (*itBx).setGtTechnicalTriggerWord(ttWordValue);
292  return;
293  }
294  }
295 
296  // if bunch cross not found, throw exception (action: SkipEvent)
297 
298  // throw cms::Exception("NotFound")
299  LogTrace("L1GlobalTriggerReadoutRecord")
300  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
301  << "Can not set technical trigger word for this bx!\n"
302  << std::endl;
303 }

References LogTrace, and m_gtFdlWord.

Referenced by setTechnicalTriggerWord().

◆ technicalTriggerWord() [1/2]

const TechnicalTriggerWord & L1GlobalTriggerReadoutRecord::technicalTriggerWord ( ) const

Definition at line 233 of file L1GlobalTriggerReadoutRecord.cc.

233  {
234  int bxInEventL1Accept = 0;
235  return technicalTriggerWord(bxInEventL1Accept);
236 }

◆ technicalTriggerWord() [2/2]

const TechnicalTriggerWord & L1GlobalTriggerReadoutRecord::technicalTriggerWord ( int  bxInEventValue) const

Definition at line 212 of file L1GlobalTriggerReadoutRecord.cc.

212  {
213  const static TechnicalTriggerWord emptyTechnicalTriggerWord;
214 
215  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
216  if ((*itBx).bxInEvent() == bxInEventValue) {
217  return (*itBx).gtTechnicalTriggerWord();
218  }
219  }
220 
221  // if bunch cross not found, throw exception (action: SkipEvent)
222  // TODO re-evaluate action
223 
224  // throw cms::Exception("NotFound")
225  LogTrace("L1GlobalTriggerReadoutRecord")
226  << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue << " does not exist.\n"
227  << "Can not return technical trigger word for this bx!\n"
228  << std::endl;
229 
230  return emptyTechnicalTriggerWord;
231 }

References LogTrace, and m_gtFdlWord.

Referenced by L1Scalers::analyze(), L1GtTrigReport::analyze(), RPCTTUMonitor::analyze(), L1TGT::analyze(), JetAnalyzer::analyze(), METAnalyzer::analyze(), L1BitComputer::compute(), FWL1TriggerTableView::fillTable(), HLTLevel1Pattern::filter(), HLTLevel1GTSeed::hltFilter(), L1GtUtils::l1Results(), ShallowEventDataProducer::produce(), L1GlobalTriggerRecordProducer::produce(), L1TExtCondLegacyToStage2::produce(), and L1Analysis::L1AnalysisGT::Set().

Friends And Related Function Documentation

◆ operator<<

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

output stream operator

Definition at line 533 of file L1GlobalTriggerReadoutRecord.cc.

533  {
534  // TODO FIXME put together all prints
535  s << "Not available yet - sorry";
536 
537  return s;
538 }

Member Data Documentation

◆ m_gtFdlWord

std::vector<L1GtFdlWord> L1GlobalTriggerReadoutRecord::m_gtFdlWord
private

◆ m_gtfeWord

L1GtfeWord L1GlobalTriggerReadoutRecord::m_gtfeWord
private

◆ m_gtPsbWord

std::vector<L1GtPsbWord> L1GlobalTriggerReadoutRecord::m_gtPsbWord
private

◆ m_muCollRefProd

edm::RefProd<L1MuGMTReadoutCollection> L1GlobalTriggerReadoutRecord::m_muCollRefProd
private
L1GlobalTriggerReadoutRecord::gtFdlWord
const L1GtFdlWord gtFdlWord() const
Definition: L1GlobalTriggerReadoutRecord.cc:390
edm::RefProd< L1MuGMTReadoutCollection >
L1GlobalTriggerReadoutRecord::m_gtFdlWord
std::vector< L1GtFdlWord > m_gtFdlWord
Definition: L1GlobalTriggerReadoutRecord.h:157
L1GlobalTriggerReadoutRecord::decisionWord
const DecisionWord & decisionWord() const
Definition: L1GlobalTriggerReadoutRecord.cc:207
L1GlobalTriggerReadoutRecord::setDecisionWord
void setDecisionWord(const DecisionWord &decisionWordValue, int bxInEventValue)
Definition: L1GlobalTriggerReadoutRecord.cc:265
L1GlobalTriggerReadoutRecord::m_muCollRefProd
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
Definition: L1GlobalTriggerReadoutRecord.h:161
L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord
void setTechnicalTriggerWord(const TechnicalTriggerWord &ttWordValue, int bxInEventValue)
Definition: L1GlobalTriggerReadoutRecord.cc:287
L1GlobalTriggerReadoutRecord::setGtPsbWord
void setGtPsbWord(const L1GtPsbWord &, cms_uint16_t boardIdValue, int bxInEventValue)
Definition: L1GlobalTriggerReadoutRecord.cc:445
L1GlobalTriggerReadoutSetup::NumberPsbBoards
static const int NumberPsbBoards
number of PSB boards in GT
Definition: L1GlobalTriggerReadoutSetup.h:77
L1GtfeWord::print
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeWord
Definition: L1GtfeWord.cc:253
L1GlobalTriggerReadoutRecord::technicalTriggerWord
const TechnicalTriggerWord & technicalTriggerWord() const
Definition: L1GlobalTriggerReadoutRecord.cc:233
L1GtfeWord
Definition: L1GtfeWord.h:30
L1GlobalTriggerReadoutRecord::gtPsbWord
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
Definition: L1GlobalTriggerReadoutRecord.cc:421
L1GtPsbWord
Definition: L1GtPsbWord.h:29
L1GlobalTriggerReadoutRecord::decision
const bool decision() const
Definition: L1GlobalTriggerReadoutRecord.cc:152
L1GlobalTriggerReadoutRecord::printGtDecision
void printGtDecision(std::ostream &myCout, int bxInEventValue) const
print global decision and algorithm decision word
Definition: L1GlobalTriggerReadoutRecord.cc:311
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GlobalTriggerReadoutRecord::setDecision
void setDecision(const bool &t, int bxInEventValue)
set global decision, decision word and technical trigger word
Definition: L1GlobalTriggerReadoutRecord.cc:240
L1GtfeWord::reset
virtual void reset()
reset the content of a L1GtfeWord
Definition: L1GtfeWord.cc:240
L1GlobalTriggerReadoutRecord::m_gtfeWord
L1GtfeWord m_gtfeWord
Definition: L1GlobalTriggerReadoutRecord.h:155
L1GlobalTriggerReadoutRecord::printTechnicalTrigger
void printTechnicalTrigger(std::ostream &myCout, int bxInEventValue) const
print technical triggers
Definition: L1GlobalTriggerReadoutRecord.cc:332
L1GtFdlWord
Definition: L1GtFdlWord.h:29
DecisionWord
std::vector< bool > DecisionWord
typedefs
Definition: L1GlobalTriggerReadoutSetupFwd.h:34
mps_fire.result
result
Definition: mps_fire.py:311
L1GlobalTriggerReadoutRecord::finalOR
const cms_uint16_t finalOR() const
Definition: L1GlobalTriggerReadoutRecord.cc:179
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
L1GlobalTriggerReadoutRecord::m_gtPsbWord
std::vector< L1GtPsbWord > m_gtPsbWord
Definition: L1GlobalTriggerReadoutRecord.h:159
TechnicalTriggerWord
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
Definition: L1GlobalTriggerReadoutSetupFwd.h:41
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143