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 (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< 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, 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< 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::L1GlobalTriggerReadoutRecord ( )

constructors

Definition at line 26 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

26  {
27  // empty GTFE
29 
30  // no FDL, no PSB
31 }
L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( int  NumberBxInEvent)

Definition at line 33 of file L1GlobalTriggerReadoutRecord.cc.

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

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

References m_gtFdlWord, m_gtfeWord, and m_gtPsbWord.

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 }
std::vector< L1GtPsbWord > m_gtPsbWord
std::vector< L1GtFdlWord > m_gtFdlWord
L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( const L1GlobalTriggerReadoutRecord result)

copy constructor

Definition at line 76 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

76  {
77  m_gtfeWord = result.m_gtfeWord;
78  m_gtFdlWord = result.m_gtFdlWord;
79  m_gtPsbWord = result.m_gtPsbWord;
80 
82 }
std::vector< L1GtPsbWord > m_gtPsbWord
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
std::vector< L1GtFdlWord > m_gtFdlWord
L1GlobalTriggerReadoutRecord::~L1GlobalTriggerReadoutRecord ( )
virtual

destructor

Definition at line 85 of file L1GlobalTriggerReadoutRecord.cc.

85  {
86  // empty now
87 }

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

References LogTrace, and m_gtFdlWord.

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

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const bool L1GlobalTriggerReadoutRecord::decision ( ) const

Definition at line 152 of file L1GlobalTriggerReadoutRecord.cc.

152  {
153  int bxInEventL1Accept = 0;
154  return decision(bxInEventL1Accept);
155 }
const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( int  bxInEventValue) const

Definition at line 186 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

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 }
std::vector< bool > DecisionWord
typedefs
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( ) const

Definition at line 207 of file L1GlobalTriggerReadoutRecord.cc.

207  {
208  int bxInEventL1Accept = 0;
209  return decisionWord(bxInEventL1Accept);
210 }
const DecisionWord & decisionWord() const
const cms_uint16_t L1GlobalTriggerReadoutRecord::finalOR ( int  bxInEventValue) const

Definition at line 159 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
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 }
const std::vector<L1GtFdlWord> L1GlobalTriggerReadoutRecord::gtFdlVector ( ) const
inline
std::vector<L1GtFdlWord>& L1GlobalTriggerReadoutRecord::gtFdlVector ( )
inline

Definition at line 121 of file L1GlobalTriggerReadoutRecord.h.

121 { return m_gtFdlWord; }
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 372 of file L1GlobalTriggerReadoutRecord.cc.

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(), DQMDcsInfo::makeGtInfo(), L1GtUtils::prescaleFactorSetIndex(), L1GlobalTriggerRecordProducer::produce(), L1GTDigiToRaw::produce(), pat::PATTriggerEventProducer::produce(), and L1Analysis::L1AnalysisGT::Set().

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( ) const

Definition at line 390 of file L1GlobalTriggerReadoutRecord.cc.

390  {
391  int bxInEventL1Accept = 0;
392  return gtFdlWord(bxInEventL1Accept);
393 }
const L1GtfeWord L1GlobalTriggerReadoutRecord::gtfeWord ( ) const
const std::vector<L1GtPsbWord> L1GlobalTriggerReadoutRecord::gtPsbVector ( ) const
inline
std::vector<L1GtPsbWord>& L1GlobalTriggerReadoutRecord::gtPsbVector ( )
inline

Definition at line 133 of file L1GlobalTriggerReadoutRecord.h.

References edm::operator<<(), edm::print(), and reset().

133 { return m_gtPsbWord; }
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 421 of file L1GlobalTriggerReadoutRecord.cc.

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().

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 }
std::vector< L1GtPsbWord > m_gtPsbWord
#define LogTrace(id)
const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( cms_uint16_t  boardIdValue) const

Definition at line 440 of file L1GlobalTriggerReadoutRecord.cc.

References gtPsbWord().

440  {
441  int bxInEventL1Accept = 0;
442  return gtPsbWord(boardIdValue, bxInEventL1Accept);
443 }
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 352 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

Referenced by L1GtPackUnpackAnalyzer::analyzeGT().

352  {
353  return m_muCollRefProd;
354 }
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
bool L1GlobalTriggerReadoutRecord::operator!= ( const L1GlobalTriggerReadoutRecord result) const

unequal operator

Definition at line 125 of file L1GlobalTriggerReadoutRecord.cc.

125  {
126  return !(result == *this);
127 }
L1GlobalTriggerReadoutRecord & L1GlobalTriggerReadoutRecord::operator= ( const L1GlobalTriggerReadoutRecord result)

assignment operator

Definition at line 90 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

90  {
91  if (this != &result) {
92  m_gtfeWord = result.m_gtfeWord;
93  m_gtFdlWord = result.m_gtFdlWord;
94  m_gtPsbWord = result.m_gtPsbWord;
95 
97  }
98 
99  return *this;
100 }
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 103 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_gtPsbWord, and m_muCollRefProd.

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

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

Referenced by L1GTDigiToRaw::produce().

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 }
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeWord
Definition: L1GtfeWord.cc:253
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 311 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

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

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::printGtDecision ( std::ostream &  myCout) const

Definition at line 326 of file L1GlobalTriggerReadoutRecord.cc.

References printGtDecision().

326  {
327  int bxInEventL1Accept = 0;
328  printGtDecision(myCout, bxInEventL1Accept);
329 }
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 332 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

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

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::printTechnicalTrigger ( std::ostream &  myCout) const

Definition at line 346 of file L1GlobalTriggerReadoutRecord.cc.

References printTechnicalTrigger().

346  {
347  int bxInEventL1Accept = 0;
348  printTechnicalTrigger(myCout, bxInEventL1Accept);
349 }
void printTechnicalTrigger(std::ostream &myCout, int bxInEventValue) const
print technical triggers
void L1GlobalTriggerReadoutRecord::reset ( void  )

clear the record

Definition at line 500 of file L1GlobalTriggerReadoutRecord.cc.

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

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 }
virtual void reset()
reset the content of a L1GtfeWord
Definition: L1GtfeWord.cc:240
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 240 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecision().

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setDecision ( const bool &  t)

Definition at line 259 of file L1GlobalTriggerReadoutRecord.cc.

References setDecision().

259  {
260  int bxInEventL1Accept = 0;
261  setDecision(t, bxInEventL1Accept);
262 }
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 265 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecisionWord().

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue)

Definition at line 282 of file L1GlobalTriggerReadoutRecord.cc.

References setDecisionWord().

282  {
283  int bxInEventL1Accept = 0;
284  setDecisionWord(decisionWordValue, bxInEventL1Accept);
285 }
void setDecisionWord(const DecisionWord &decisionWordValue, int bxInEventValue)
void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue,
int  bxInEventValue 
)

Definition at line 395 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by L1GlobalTriggerFDL::fillDaqFdlBlock().

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue)

Definition at line 415 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

415  {
416  // just push back the new FDL block
417  m_gtFdlWord.push_back(gtFdlWordValue);
418 }
std::vector< L1GtFdlWord > m_gtFdlWord
void L1GlobalTriggerReadoutRecord::setGtfeWord ( const L1GtfeWord gtfeWordValue)

Definition at line 369 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

369 { m_gtfeWord = gtfeWordValue; }
void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue,
cms_uint16_t  boardIdValue,
int  bxInEventValue 
)

Definition at line 445 of file L1GlobalTriggerReadoutRecord.cc.

References TauDecayModes::dec, LogTrace, and m_gtPsbWord.

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

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 }
std::vector< L1GtPsbWord > m_gtPsbWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue,
cms_uint16_t  boardIdValue 
)

Definition at line 486 of file L1GlobalTriggerReadoutRecord.cc.

References setGtPsbWord().

486  {
487  int bxInEventL1Accept = 0;
488  setGtPsbWord(gtPsbWordValue, boardIdValue, bxInEventL1Accept);
489 }
void setGtPsbWord(const L1GtPsbWord &, cms_uint16_t boardIdValue, int bxInEventValue)
void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue)

Definition at line 491 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtPsbWord.

491  {
492  // just push back the new PSB block
493  m_gtPsbWord.push_back(gtPsbWordValue);
494 }
std::vector< L1GtPsbWord > m_gtPsbWord
void L1GlobalTriggerReadoutRecord::setMuCollectionRefProd ( edm::Handle< L1MuGMTReadoutCollection > &  muHandle)

Definition at line 356 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

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

Definition at line 360 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

360  {
361  m_muCollRefProd = refProdMuGMT;
362 }
edm::RefProd< L1MuGMTReadoutCollection > m_muCollRefProd
void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue,
int  bxInEventValue 
)

Definition at line 287 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setTechnicalTriggerWord().

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 }
std::vector< L1GtFdlWord > m_gtFdlWord
#define LogTrace(id)
void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue)

Definition at line 305 of file L1GlobalTriggerReadoutRecord.cc.

References setTechnicalTriggerWord().

305  {
306  int bxInEventL1Accept = 0;
307  setTechnicalTriggerWord(ttWordValue, bxInEventL1Accept);
308 }
void setTechnicalTriggerWord(const TechnicalTriggerWord &ttWordValue, int bxInEventValue)
const TechnicalTriggerWord & L1GlobalTriggerReadoutRecord::technicalTriggerWord ( int  bxInEventValue) const

Definition at line 212 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

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

233  {
234  int bxInEventL1Accept = 0;
235  return technicalTriggerWord(bxInEventL1Accept);
236 }
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 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

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