CMS 3D CMS Logo

L1GlobalTriggerReadoutRecord Class Reference

Description: readout record for L1 Global Trigger. More...

#include <DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h>

List of all members.

Public Member Functions

const bool decision () const
const bool decision (int bxInEventValue) const
 get Global Trigger decision, decision word and technical trigger word overloaded w.r.t.
const DecisionWord decisionWord () const
const DecisionWord decisionWord (int bxInEventValue) const
const boost::uint16_t finalOR () const
const boost::uint16_t finalOR (int bxInEventValue) const
std::vector< L1GtFdlWord > & gtFdlVector ()
const std::vector< L1GtFdlWordgtFdlVector () const
 get the vector of L1GtFdlWord
const L1GtFdlWord gtFdlWord () const
const L1GtFdlWord gtFdlWord (int bxInEventValue) const
 get / set FDL word (record) in the GT readout record
const L1GtfeWord gtfeWord () const
 get / set GTFE word (record) in the GT readout record
std::vector< L1GtPsbWord > & gtPsbVector ()
const std::vector< L1GtPsbWordgtPsbVector () const
 get the vector of L1GtPsbWord
const L1GtPsbWord gtPsbWord (boost::uint16_t boardIdValue) const
const L1GtPsbWord gtPsbWord (boost::uint16_t boardIdValue, int bxInEventValue) const
 get / set PSB word (record) in the GT readout record
 L1GlobalTriggerReadoutRecord (const L1GlobalTriggerReadoutRecord &)
 copy constructor
 L1GlobalTriggerReadoutRecord (const int numberBxInEvent, const int numberFdlBoards, const int numberPsbBoards)
 L1GlobalTriggerReadoutRecord (int NumberBxInEvent)
 L1GlobalTriggerReadoutRecord ()
 constructors
const edm::RefProd
< L1MuGMTReadoutCollection
muCollectionRefProd () const
 get / set reference to L1MuGMTReadoutCollection
bool operator!= (const L1GlobalTriggerReadoutRecord &) const
 unequal operator
L1GlobalTriggerReadoutRecordoperator= (const L1GlobalTriggerReadoutRecord &)
 assignment operator
bool operator== (const L1GlobalTriggerReadoutRecord &) const
 equal operator
void print (std::ostream &myCout) const
 pretty print the content of a L1GlobalTriggerReadoutRecord
void printGtDecision (std::ostream &myCout) const
void printGtDecision (std::ostream &myCout, int bxInEventValue) const
 print global decision and algorithm decision word
void printTechnicalTrigger (std::ostream &myCout) const
void printTechnicalTrigger (std::ostream &myCout, int bxInEventValue) const
 print technical triggers
void reset ()
 clear the record
void setDecision (const bool &t)
void setDecision (const bool &t, int bxInEventValue)
 set global decision, decision word and technical trigger word
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 &gtPsbWordValue)
void setGtPsbWord (const L1GtPsbWord &, boost::uint16_t boardIdValue)
void setGtPsbWord (const L1GtPsbWord &, boost::uint16_t boardIdValue, int bxInEventValue)
void setMuCollectionRefProd (const edm::RefProd< L1MuGMTReadoutCollection > &)
void setMuCollectionRefProd (edm::Handle< L1MuGMTReadoutCollection > &)
void setTechnicalTriggerWord (const TechnicalTriggerWord &ttWordValue)
void setTechnicalTriggerWord (const TechnicalTriggerWord &ttWordValue, int bxInEventValue)
const TechnicalTriggerWord technicalTriggerWord () const
const TechnicalTriggerWord technicalTriggerWord (int bxInEventValue) const
virtual ~L1GlobalTriggerReadoutRecord ()
 destructor

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


Detailed Description

Description: readout record for L1 Global Trigger.

Description: see header file.

Implementation: <TODO: enter implementation details>

Author:
: N. Neumeister - HEPHY Vienna - ORCA version

: Vasile Mihai Ghete - HEPHY Vienna - CMSSW version

$Date$ $Revision$

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.

00033 {
00034 
00035     // empty GTFE
00036     m_gtfeWord = L1GtfeWord();
00037 
00038     // no FDL, no PSB
00039 }

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( int  NumberBxInEvent  ) 

Definition at line 41 of file L1GlobalTriggerReadoutRecord.cc.

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

00042 {
00043 
00044     m_gtfeWord = L1GtfeWord();
00045 
00046     m_gtFdlWord.reserve(numberBxInEvent);
00047     m_gtFdlWord.assign(numberBxInEvent, L1GtFdlWord());
00048 
00049     // min value of bxInEvent
00050     int minBxInEvent = (numberBxInEvent + 1)/2 - numberBxInEvent;
00051     //int maxBxInEvent = (numberBxInEvent + 1)/2 - 1; // not needed
00052 
00053     // matrix index [0, numberBxInEvent) -> bxInEvent [minBxInEvent, maxBxInEvent]
00054     // warning: matrix index != bxInEvent
00055     for (int iFdl = 0; iFdl < numberBxInEvent; ++iFdl) {
00056         int iBxInEvent = minBxInEvent + iFdl;
00057         m_gtFdlWord[iFdl].setBxInEvent(iBxInEvent);
00058     }
00059 
00060     // PSBs
00061     int numberPsb = L1GlobalTriggerReadoutSetup::NumberPsbBoards;
00062     int totalNumberPsb = numberPsb*numberBxInEvent;
00063 
00064     m_gtPsbWord.reserve(totalNumberPsb);
00065     m_gtPsbWord.assign(totalNumberPsb, L1GtPsbWord());
00066 
00067 
00068 }

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.

00074 {
00075 
00076     // GTFE board
00077     m_gtfeWord = L1GtfeWord();
00078 
00079     // FDL board
00080     if (numberFdlBoards > 0) {
00081         m_gtFdlWord.reserve(numberBxInEvent);
00082     }
00083 
00084     // PSB boards
00085     if (numberPsbBoards > 0) {
00086         m_gtPsbWord.reserve(numberPsbBoards*numberBxInEvent);
00087     }
00088 
00089 }

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.

00094 {
00095 
00096     m_gtfeWord = result.m_gtfeWord;
00097     m_gtFdlWord = result.m_gtFdlWord;
00098     m_gtPsbWord = result.m_gtPsbWord;
00099 
00100     m_muCollRefProd = result.m_muCollRefProd;
00101 
00102 
00103 }

L1GlobalTriggerReadoutRecord::~L1GlobalTriggerReadoutRecord (  )  [virtual]

destructor

Definition at line 106 of file L1GlobalTriggerReadoutRecord.cc.

00107 {
00108 
00109     // empty now
00110 
00111 }


Member Function Documentation

const bool L1GlobalTriggerReadoutRecord::decision (  )  const

Definition at line 196 of file L1GlobalTriggerReadoutRecord.cc.

00197 {
00198 
00199     int bxInEventL1Accept = 0;
00200     return decision(bxInEventL1Accept);
00201 }

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 lat::endl(), LogTrace, and m_gtFdlWord.

00172 {
00173 
00174     for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
00175             itBx != m_gtFdlWord.end(); ++itBx) {
00176 
00177         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00178             return (*itBx).finalOR();
00179         }
00180     }
00181 
00182     // if bunch cross not found, throw exception (action: SkipEvent)
00183     // TODO re-evaluate action
00184 
00185     //    throw cms::Exception("NotFound")
00186     LogTrace("L1GlobalTriggerReadoutRecord")
00187     << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
00188     << " does not exist.\n"
00189     << "Can not return global decision for this bx!\n"
00190     << std::endl;
00191 
00192     return false;
00193 }

const DecisionWord L1GlobalTriggerReadoutRecord::decisionWord (  )  const

Definition at line 267 of file L1GlobalTriggerReadoutRecord.cc.

00268 {
00269 
00270     int bxInEventL1Accept = 0;
00271     return decisionWord(bxInEventL1Accept);
00272 }

const DecisionWord L1GlobalTriggerReadoutRecord::decisionWord ( int  bxInEventValue  )  const

Definition at line 241 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

Referenced by L1TauAnalyzer::evalL1Decisions().

00242 {
00243 
00244     for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
00245             itBx != m_gtFdlWord.end(); ++itBx) {
00246 
00247         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00248             return (*itBx).gtDecisionWord();
00249         }
00250     }
00251 
00252     // if bunch cross not found, throw exception (action: SkipEvent)
00253     // TODO re-evaluate action
00254 
00255     //    throw cms::Exception("NotFound")
00256     LogTrace("L1GlobalTriggerReadoutRecord")
00257     << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
00258     << " does not exist.\n"
00259     << "Can not return decision word for this bx!\n"
00260     << std::endl;
00261 
00262     DecisionWord dW; // empty; it does not arrive here
00263     return dW;
00264 }

const boost::uint16_t L1GlobalTriggerReadoutRecord::finalOR (  )  const

Definition at line 230 of file L1GlobalTriggerReadoutRecord.cc.

00231 {
00232 
00233     int bxInEventL1Accept = 0;
00234     return finalOR(bxInEventL1Accept);
00235 }

const boost::uint16_t L1GlobalTriggerReadoutRecord::finalOR ( int  bxInEventValue  )  const

Definition at line 205 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

00206 {
00207 
00208     for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
00209             itBx != m_gtFdlWord.end(); ++itBx) {
00210 
00211         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00212             return (*itBx).finalOR();
00213         }
00214     }
00215 
00216     // if bunch cross not found, throw exception (action: SkipEvent)
00217     // TODO re-evaluate action
00218 
00219     //    throw cms::Exception("NotFound")
00220     LogTrace("L1GlobalTriggerReadoutRecord")
00221     << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
00222     << " does not exist.\n"
00223     << "Can not return finalOR for this bx!\n"
00224     << std::endl;
00225 
00226     return 0;
00227 }

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

Definition at line 139 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

00140     {
00141         return m_gtFdlWord;
00142     }

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

get the vector of L1GtFdlWord

Definition at line 134 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

00135     {
00136         return m_gtFdlWord;
00137     }

const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord (  )  const

Definition at line 548 of file L1GlobalTriggerReadoutRecord.cc.

00549 {
00550 
00551     int bxInEventL1Accept = 0;
00552     return gtFdlWord(bxInEventL1Accept);
00553 }

const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( int  bxInEventValue  )  const

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

Definition at line 524 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

00525 {
00526 
00527     for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
00528             itBx != m_gtFdlWord.end(); ++itBx) {
00529 
00530         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00531             return (*itBx);
00532         }
00533     }
00534 
00535     // if bunch cross not found, throw exception (action: SkipEvent)
00536 
00537     //    throw cms::Exception("NotFound")
00538     LogTrace("L1GlobalTriggerReadoutRecord")
00539     << "\nError: requested L1GtFdlWord for bxInEvent = " << bxInEventValue
00540     << " does not exist.\n"
00541     << std::endl;
00542 
00543     // return empty record - actually does not arrive here
00544     return L1GtFdlWord();
00545 
00546 }

const L1GtfeWord L1GlobalTriggerReadoutRecord::gtfeWord (  )  const

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

Definition at line 509 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

00510 {
00511 
00512     return m_gtfeWord;
00513 
00514 }

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

Definition at line 157 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

00158     {
00159         return m_gtPsbWord;
00160     }

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

get the vector of L1GtPsbWord

Definition at line 152 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

00153     {
00154         return m_gtPsbWord;
00155     }

const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( boost::uint16_t  boardIdValue  )  const

Definition at line 624 of file L1GlobalTriggerReadoutRecord.cc.

References gtPsbWord().

00625 {
00626 
00627     int bxInEventL1Accept = 0;
00628     return gtPsbWord(boardIdValue, bxInEventL1Accept);
00629 }

const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( boost::uint16_t  boardIdValue,
int  bxInEventValue 
) const

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

Definition at line 593 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtPsbWord.

Referenced by gtPsbWord().

00595 {
00596 
00597     for (std::vector<L1GtPsbWord>::const_iterator itBx = m_gtPsbWord.begin();
00598             itBx != m_gtPsbWord.end(); ++itBx) {
00599 
00600         if (
00601             ((*itBx).bxInEvent() == bxInEventValue) &&
00602             ((*itBx).boardId() == boardIdValue)) {
00603 
00604             return (*itBx);
00605 
00606         }
00607     }
00608 
00609     // if bunch cross or boardId not found, throw exception (action: SkipEvent)
00610 
00611     //    throw cms::Exception("NotFound")
00612     LogTrace("L1GlobalTriggerReadoutRecord")
00613     << "\nError: requested L1GtPsbWord for boardId = "
00614     << std::hex << boardIdValue << std::dec
00615     << " and bxInEvent = " << bxInEventValue
00616     << " does not exist.\n"
00617     << std::endl;
00618 
00619     // return empty record - actually does not arrive here
00620     return L1GtPsbWord();
00621 
00622 }

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

get / set reference to L1MuGMTReadoutCollection

Definition at line 483 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

00484 {
00485 
00486     return m_muCollRefProd;
00487 }

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

unequal operator

Definition at line 159 of file L1GlobalTriggerReadoutRecord.cc.

00161 {
00162 
00163     return !( result == *this);
00164 
00165 }

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.

00116 {
00117 
00118     if ( this != &result ) {
00119 
00120         m_gtfeWord = result.m_gtfeWord;
00121         m_gtFdlWord  = result.m_gtFdlWord;
00122         m_gtPsbWord  = result.m_gtPsbWord;
00123 
00124         m_muCollRefProd = result.m_muCollRefProd;
00125 
00126     }
00127 
00128     return *this;
00129 
00130 }

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.

00135 {
00136 
00137     if (m_gtfeWord != result.m_gtfeWord) {
00138         return false;
00139     }
00140 
00141     if (m_gtFdlWord  != result.m_gtFdlWord) {
00142         return false;
00143     }
00144 
00145     if (m_gtPsbWord  != result.m_gtPsbWord) {
00146         return false;
00147     }
00148 
00149     if (m_muCollRefProd != result.m_muCollRefProd) {
00150         return false;
00151     }
00152 
00153     // all members identical
00154     return true;
00155 
00156 }

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

pretty print the content of a L1GlobalTriggerReadoutRecord

Definition at line 736 of file L1GlobalTriggerReadoutRecord.cc.

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

00737 {
00738 
00739     myCout << "\n L1GlobalTriggerReadoutRecord::print \n" << std::endl;
00740 
00741     m_gtfeWord.print(myCout);
00742 
00743     for (std::vector<L1GtFdlWord>::const_iterator itFdl = m_gtFdlWord.begin();
00744             itFdl != m_gtFdlWord.end(); ++itFdl) {
00745 
00746         itFdl->print(myCout);
00747 
00748     }
00749 
00750     for (std::vector<L1GtPsbWord>::const_iterator itPsb = m_gtPsbWord.begin();
00751             itPsb != m_gtPsbWord.end(); ++itPsb) {
00752 
00753         itPsb->print(myCout);
00754 
00755     }
00756 
00757     // FIXME add  L1MuGMTReadoutCollection printing
00758     //    edm::RefProd<L1MuGMTReadoutCollection> m_muCollRefProd;
00759 
00760 
00761 
00762 
00763 }

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

Definition at line 440 of file L1GlobalTriggerReadoutRecord.cc.

References printGtDecision().

00441 {
00442 
00443     int bxInEventL1Accept = 0;
00444     printGtDecision(myCout, bxInEventL1Accept);
00445 
00446 }

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

print global decision and algorithm decision word

Definition at line 415 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), and m_gtFdlWord.

Referenced by printGtDecision().

00417 {
00418 
00419     for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
00420             itBx != m_gtFdlWord.end(); ++itBx) {
00421 
00422         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00423 
00424             myCout << "\nL1 Global Trigger Record: " << std::endl;
00425 
00426             myCout << "  Bunch cross " << bxInEventValue
00427             << std::endl
00428             << "  Global Decision = " << std::setw(5) << (*itBx).globalDecision()
00429             << std::endl;
00430 
00431             (*itBx).printGtDecisionWord(myCout);
00432 
00433         }
00434     }
00435 
00436     myCout << std::endl;
00437 
00438 }

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

Definition at line 472 of file L1GlobalTriggerReadoutRecord.cc.

References printTechnicalTrigger().

00473 {
00474 
00475     int bxInEventL1Accept = 0;
00476     printTechnicalTrigger(myCout, bxInEventL1Accept);
00477 
00478 }

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

print technical triggers

Definition at line 449 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), and m_gtFdlWord.

Referenced by printTechnicalTrigger().

00452 {
00453 
00454     for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
00455             itBx != m_gtFdlWord.end(); ++itBx) {
00456 
00457         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00458 
00459             myCout << "\nL1 Global Trigger Record: " << std::endl;
00460 
00461             myCout << "  Bunch cross " << bxInEventValue
00462             << std::endl;
00463 
00464             (*itBx).printGtTechnicalTriggerWord(myCout);
00465         }
00466     }
00467 
00468     myCout << std::endl;
00469 
00470 }

void L1GlobalTriggerReadoutRecord::reset ( void   ) 

clear the record

Definition at line 712 of file L1GlobalTriggerReadoutRecord.cc.

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

00713 {
00714 
00715     m_gtfeWord.reset();
00716 
00717     for (std::vector<L1GtFdlWord>::iterator itFdl = m_gtFdlWord.begin();
00718             itFdl != m_gtFdlWord.end(); ++itFdl) {
00719 
00720         itFdl->reset();
00721 
00722     }
00723 
00724     for (std::vector<L1GtPsbWord>::iterator itPsb = m_gtPsbWord.begin();
00725             itPsb != m_gtPsbWord.end(); ++itPsb) {
00726 
00727         itPsb->reset();
00728 
00729     }
00730 
00731     // TODO FIXME reset m_muCollRefProd
00732 
00733 }

void L1GlobalTriggerReadoutRecord::setDecision ( const bool t  ) 

Definition at line 336 of file L1GlobalTriggerReadoutRecord.cc.

References setDecision().

00337 {
00338 
00339     int bxInEventL1Accept = 0;
00340     setDecision(t, bxInEventL1Accept);
00341 }

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

set global decision, decision word and technical trigger word

Definition at line 310 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

Referenced by setDecision().

00311 {
00312 
00313     for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
00314             itBx != m_gtFdlWord.end(); ++itBx) {
00315 
00316         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00317 
00318             // TODO FIXME when manipulating partitions
00319             (*itBx).setFinalOR(static_cast<uint16_t> (t));
00320             return;
00321         }
00322     }
00323 
00324     // if bunch cross not found, throw exception (action: SkipEvent)
00325 
00326     //    throw cms::Exception("NotFound")
00327     LogTrace("L1GlobalTriggerReadoutRecord")
00328     << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
00329     << " does not exist.\n"
00330     << "Can not set global decision for this bx!\n"
00331     << std::endl;
00332 
00333 }

void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue  ) 

Definition at line 370 of file L1GlobalTriggerReadoutRecord.cc.

References setDecisionWord().

00372 {
00373 
00374     int bxInEventL1Accept = 0;
00375     setDecisionWord(decisionWordValue, bxInEventL1Accept);
00376 
00377 }

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

Definition at line 344 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

Referenced by setDecisionWord().

00347 {
00348 
00349     for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
00350             itBx != m_gtFdlWord.end(); ++itBx) {
00351 
00352         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00353 
00354             (*itBx).setGtDecisionWord (decisionWordValue);
00355             return;
00356         }
00357     }
00358 
00359     // if bunch cross not found, throw exception (action: SkipEvent)
00360 
00361     //    throw cms::Exception("NotFound")
00362     LogTrace("L1GlobalTriggerReadoutRecord")
00363     << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
00364     << " does not exist.\n"
00365     << "Can not set decision word for this bx!\n"
00366     << std::endl;
00367 
00368 }

void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue  ) 

Definition at line 583 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

00584 {
00585 
00586     // just push back the new FDL block
00587     m_gtFdlWord.push_back(gtFdlWordValue);
00588 
00589 }

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

Definition at line 555 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

00557 {
00558 
00559     // if a L1GtFdlWord exists for bxInEventValue, replace it
00560     for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
00561             itBx != m_gtFdlWord.end(); ++itBx) {
00562 
00563         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00564             *itBx = gtFdlWordValue;
00565             LogTrace("L1GlobalTriggerReadoutRecord")
00566             << "L1GlobalTriggerReadoutRecord: replacing L1GtFdlWord for bxInEvent = "
00567             << bxInEventValue << "\n"
00568             << std::endl;
00569             return;
00570         }
00571     }
00572 
00573     // if bunch cross not found, throw exception (action: SkipEvent)
00574     // all L1GtFdlWord are created in the record constructor for allowed bunch crosses
00575 
00576     //    throw cms::Exception("NotFound")
00577     LogTrace("L1GlobalTriggerReadoutRecord")
00578     << "\nError: Cannot set L1GtFdlWord for bxInEvent = " << bxInEventValue
00579     << std::endl;
00580 
00581 }

void L1GlobalTriggerReadoutRecord::setGtfeWord ( const L1GtfeWord gtfeWordValue  ) 

Definition at line 516 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

00517 {
00518 
00519     m_gtfeWord = gtfeWordValue;
00520 
00521 }

void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue  ) 

Definition at line 701 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtPsbWord.

00702 {
00703     // just push back the new PSB block
00704     m_gtPsbWord.push_back(gtPsbWordValue);
00705 
00706 }

void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue,
boost::uint16_t  boardIdValue 
)

Definition at line 692 of file L1GlobalTriggerReadoutRecord.cc.

References setGtPsbWord().

00694 {
00695 
00696     int bxInEventL1Accept = 0;
00697     setGtPsbWord(gtPsbWordValue, boardIdValue, bxInEventL1Accept);
00698 
00699 }

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

Definition at line 631 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtPsbWord.

Referenced by setGtPsbWord().

00633 {
00634 
00635     // if a L1GtPsbWord with the same bxInEventValue and boardIdValue exists, replace it
00636     for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin();
00637             itBx != m_gtPsbWord.end(); ++itBx) {
00638 
00639         if (
00640             ((*itBx).bxInEvent() == bxInEventValue) &&
00641             ((*itBx).boardId() == boardIdValue)) {
00642 
00643             *itBx = gtPsbWordValue;
00644 
00645             LogTrace("L1GlobalTriggerReadoutRecord")
00646             << "\nL1GlobalTriggerReadoutRecord: replacing L1GtPsbWord with boardId = "
00647             << std::hex << boardIdValue << std::dec
00648             << " and bxInEvent = " << bxInEventValue
00649             << "\n"
00650             << std::endl;
00651             return;
00652         }
00653     }
00654 
00655     // otherwise, write in the first empty PSB
00656     // empty means: PSB with bxInEvent = 0, boardId = 0
00657 
00658     for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin();
00659             itBx != m_gtPsbWord.end(); ++itBx) {
00660 
00661         if (
00662             ((*itBx).bxInEvent() == 0) &&
00663             ((*itBx).boardId() == 0)) {
00664 
00665             *itBx = gtPsbWordValue;
00666 
00667             LogTrace("L1GlobalTriggerReadoutRecord")
00668             << "\nL1GlobalTriggerReadoutRecord: filling an empty L1GtPsbWord"
00669             << " for PSB with boardId = "
00670             << std::hex << boardIdValue << std::dec
00671             << " and bxInEvent = " << bxInEventValue
00672             << "\n"
00673             << std::endl;
00674             return;
00675         }
00676     }
00677 
00678     // no PSB to replace, no empty PSB: throw exception (action: SkipEvent)
00679     // all L1GtPsbWord are created in the record constructor
00680 
00681     //    throw cms::Exception("NotFound")
00682     LogTrace("L1GlobalTriggerReadoutRecord")
00683     << "\nError: Cannot set L1GtPsbWord for PSB with boardId = "
00684     << std::hex << boardIdValue << std::dec
00685     << " and bxInEvent = " << bxInEventValue
00686     << "\n  No PSB to replace and no empty PSB found!\n"
00687     << std::endl;
00688 
00689 
00690 }

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

Definition at line 497 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

00499 {
00500 
00501     m_muCollRefProd = refProdMuGMT;
00502 
00503 }

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

Definition at line 489 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

00491 {
00492 
00493     m_muCollRefProd = edm::RefProd<L1MuGMTReadoutCollection>(muHandle);
00494 
00495 }

void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue  ) 

Definition at line 403 of file L1GlobalTriggerReadoutRecord.cc.

References setTechnicalTriggerWord().

00405 {
00406 
00407     int bxInEventL1Accept = 0;
00408     setTechnicalTriggerWord(ttWordValue, bxInEventL1Accept);
00409 
00410 }

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

Definition at line 379 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

Referenced by setTechnicalTriggerWord().

00381 {
00382 
00383     for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
00384             itBx != m_gtFdlWord.end(); ++itBx) {
00385 
00386         if ((*itBx).bxInEvent() == bxInEventValue) {
00387 
00388             (*itBx).setGtTechnicalTriggerWord(ttWordValue);
00389             return;
00390         }
00391     }
00392 
00393     // if bunch cross not found, throw exception (action: SkipEvent)
00394 
00395     //    throw cms::Exception("NotFound")
00396     LogTrace("L1GlobalTriggerReadoutRecord")
00397             << "\nError: requested GtFdlWord for bxInEvent = "
00398             << bxInEventValue << " does not exist.\n"
00399             << "Can not set technical trigger word for this bx!\n" << std::endl;
00400 
00401 }

const TechnicalTriggerWord L1GlobalTriggerReadoutRecord::technicalTriggerWord (  )  const

Definition at line 300 of file L1GlobalTriggerReadoutRecord.cc.

00300                                                                                     {
00301 
00302     int bxInEventL1Accept = 0;
00303     return technicalTriggerWord(bxInEventL1Accept);
00304 
00305 }

const TechnicalTriggerWord L1GlobalTriggerReadoutRecord::technicalTriggerWord ( int  bxInEventValue  )  const

Definition at line 276 of file L1GlobalTriggerReadoutRecord.cc.

References lat::endl(), LogTrace, and m_gtFdlWord.

00276                                                                                                       {
00277 
00278     for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
00279             itBx != m_gtFdlWord.end(); ++itBx) {
00280 
00281         if ( (*itBx).bxInEvent() == bxInEventValue ) {
00282             return (*itBx).gtTechnicalTriggerWord();
00283         }
00284     }
00285 
00286     // if bunch cross not found, throw exception (action: SkipEvent)
00287     // TODO re-evaluate action
00288 
00289     //    throw cms::Exception("NotFound")
00290     LogTrace("L1GlobalTriggerReadoutRecord")
00291     << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
00292     << " does not exist.\n"
00293     << "Can not return technical trigger word for this bx!\n"
00294     << std::endl;
00295 
00296     TechnicalTriggerWord ttW; // empty; it does not arrive here
00297     return ttW;
00298 }


Friends And Related Function Documentation

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

output stream operator

Definition at line 766 of file L1GlobalTriggerReadoutRecord.cc.

00767 {
00768     // TODO FIXME put together all prints
00769     s << "Not available yet - sorry";
00770 
00771     return s;
00772 
00773 }


Member Data Documentation

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

Definition at line 186 of file L1GlobalTriggerReadoutRecord.h.

Referenced by decision(), decisionWord(), finalOR(), gtFdlVector(), gtFdlWord(), L1GlobalTriggerReadoutRecord(), operator=(), operator==(), print(), printGtDecision(), printTechnicalTrigger(), reset(), setDecision(), setDecisionWord(), setGtFdlWord(), setTechnicalTriggerWord(), and technicalTriggerWord().

L1GtfeWord L1GlobalTriggerReadoutRecord::m_gtfeWord [private]

Definition at line 184 of file L1GlobalTriggerReadoutRecord.h.

Referenced by gtfeWord(), L1GlobalTriggerReadoutRecord(), operator=(), operator==(), print(), reset(), and setGtfeWord().

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

Definition at line 188 of file L1GlobalTriggerReadoutRecord.h.

Referenced by gtPsbVector(), gtPsbWord(), L1GlobalTriggerReadoutRecord(), operator=(), operator==(), print(), reset(), and setGtPsbWord().

edm::RefProd<L1MuGMTReadoutCollection> L1GlobalTriggerReadoutRecord::m_muCollRefProd [private]

Definition at line 190 of file L1GlobalTriggerReadoutRecord.h.

Referenced by L1GlobalTriggerReadoutRecord(), muCollectionRefProd(), operator=(), operator==(), and setMuCollectionRefProd().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:42 2009 for CMSSW by  doxygen 1.5.4