CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

L1GlobalTriggerReadoutRecord Class Reference

#include <L1GlobalTriggerReadoutRecord.h>

List of all members.

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

Implementation: <TODO: enter implementation details>

Author:
: N. Neumeister - HEPHY Vienna - ORCA version
: Vasile Mihai Ghete - HEPHY Vienna - CMSSW version

$Date$ $Revision$

Description: see header file.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 49 of file L1GlobalTriggerReadoutRecord.h.


Constructor & Destructor Documentation

L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( )

constructors

Definition at line 32 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

{

    // empty GTFE
    m_gtfeWord = L1GtfeWord();

    // no FDL, no PSB
}
L1GlobalTriggerReadoutRecord::L1GlobalTriggerReadoutRecord ( int  NumberBxInEvent)

Definition at line 41 of file L1GlobalTriggerReadoutRecord.cc.

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

{

    m_gtfeWord = L1GtfeWord();

    m_gtFdlWord.reserve(numberBxInEvent);
    m_gtFdlWord.assign(numberBxInEvent, L1GtFdlWord());

    // min value of bxInEvent
    int minBxInEvent = (numberBxInEvent + 1)/2 - numberBxInEvent;
    //int maxBxInEvent = (numberBxInEvent + 1)/2 - 1; // not needed

    // matrix index [0, numberBxInEvent) -> bxInEvent [minBxInEvent, maxBxInEvent]
    // warning: matrix index != bxInEvent
    for (int iFdl = 0; iFdl < numberBxInEvent; ++iFdl) {
        int iBxInEvent = minBxInEvent + iFdl;
        m_gtFdlWord[iFdl].setBxInEvent(iBxInEvent);
    }

    // PSBs
    int numberPsb = L1GlobalTriggerReadoutSetup::NumberPsbBoards;
    int totalNumberPsb = numberPsb*numberBxInEvent;

    m_gtPsbWord.reserve(totalNumberPsb);
    m_gtPsbWord.assign(totalNumberPsb, L1GtPsbWord());


}
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.

{

    // GTFE board
    m_gtfeWord = L1GtfeWord();

    // FDL board
    if (numberFdlBoards > 0) {
        m_gtFdlWord.reserve(numberBxInEvent);
    }

    // PSB boards
    if (numberPsbBoards > 0) {
        m_gtPsbWord.reserve(numberPsbBoards*numberBxInEvent);
    }

}
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.

L1GlobalTriggerReadoutRecord::~L1GlobalTriggerReadoutRecord ( ) [virtual]

destructor

Definition at line 106 of file L1GlobalTriggerReadoutRecord.cc.

{

    // empty now

}

Member Function Documentation

const bool L1GlobalTriggerReadoutRecord::decision ( int  bxInEventValue) const

get Global Trigger decision, decision word and technical trigger word overloaded w.r.t. bxInEvent argument bxInEvent not given: for bunch cross with L1Accept

Definition at line 171 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

{

    for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {
            return (*itBx).finalOR();
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)
    // TODO re-evaluate action

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << "Can not return global decision for this bx!\n"
    << std::endl;

    return false;
}
const bool L1GlobalTriggerReadoutRecord::decision ( ) const

Definition at line 196 of file L1GlobalTriggerReadoutRecord.cc.

{

    int bxInEventL1Accept = 0;
    return decision(bxInEventL1Accept);
}
const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( int  bxInEventValue) const

Definition at line 241 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

{
    static DecisionWord emptyDecisionWord;

    for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {
            return (*itBx).gtDecisionWord();
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)
    // TODO re-evaluate action

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << "Can not return decision word for this bx!\n"
    << std::endl;

    return emptyDecisionWord;
}
const DecisionWord & L1GlobalTriggerReadoutRecord::decisionWord ( ) const

Definition at line 267 of file L1GlobalTriggerReadoutRecord.cc.

{

    int bxInEventL1Accept = 0;
    return decisionWord(bxInEventL1Accept);
}
const cms_uint16_t L1GlobalTriggerReadoutRecord::finalOR ( int  bxInEventValue) const

Definition at line 205 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

{

    for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {
            return (*itBx).finalOR();
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)
    // TODO re-evaluate action

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << "Can not return finalOR for this bx!\n"
    << std::endl;

    return 0;
}
const cms_uint16_t L1GlobalTriggerReadoutRecord::finalOR ( ) const

Definition at line 230 of file L1GlobalTriggerReadoutRecord.cc.

{

    int bxInEventL1Accept = 0;
    return finalOR(bxInEventL1Accept);
}
const std::vector<L1GtFdlWord> L1GlobalTriggerReadoutRecord::gtFdlVector ( ) const [inline]

get the vector of L1GtFdlWord

Definition at line 134 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

    {
        return m_gtFdlWord;
    }
std::vector<L1GtFdlWord>& L1GlobalTriggerReadoutRecord::gtFdlVector ( ) [inline]

Definition at line 139 of file L1GlobalTriggerReadoutRecord.h.

References m_gtFdlWord.

    {
        return m_gtFdlWord;
    }
const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( int  bxInEventValue) const

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

Definition at line 526 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

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

{

    for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {
            return (*itBx);
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested L1GtFdlWord for bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << std::endl;

    // return empty record - actually does not arrive here
    return L1GtFdlWord();

}
const L1GtFdlWord L1GlobalTriggerReadoutRecord::gtFdlWord ( ) const

Definition at line 550 of file L1GlobalTriggerReadoutRecord.cc.

{

    int bxInEventL1Accept = 0;
    return gtFdlWord(bxInEventL1Accept);
}
const L1GtfeWord L1GlobalTriggerReadoutRecord::gtfeWord ( ) const

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

Definition at line 511 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

{

    return m_gtfeWord;

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

get the vector of L1GtPsbWord

Definition at line 152 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

    {
        return m_gtPsbWord;
    }
std::vector<L1GtPsbWord>& L1GlobalTriggerReadoutRecord::gtPsbVector ( ) [inline]

Definition at line 157 of file L1GlobalTriggerReadoutRecord.h.

References m_gtPsbWord.

    {
        return m_gtPsbWord;
    }
const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( cms_uint16_t  boardIdValue,
int  bxInEventValue 
) const

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

Definition at line 595 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtPsbWord.

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

{

    for (std::vector<L1GtPsbWord>::const_iterator itBx = m_gtPsbWord.begin();
            itBx != m_gtPsbWord.end(); ++itBx) {

        if (
            ((*itBx).bxInEvent() == bxInEventValue) &&
            ((*itBx).boardId() == boardIdValue)) {

            return (*itBx);

        }
    }

    // if bunch cross or boardId not found, throw exception (action: SkipEvent)

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested L1GtPsbWord for boardId = "
    << std::hex << boardIdValue << std::dec
    << " and bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << std::endl;

    // return empty record - actually does not arrive here
    return L1GtPsbWord();

}
const L1GtPsbWord L1GlobalTriggerReadoutRecord::gtPsbWord ( cms_uint16_t  boardIdValue) const

Definition at line 626 of file L1GlobalTriggerReadoutRecord.cc.

References gtPsbWord().

{

    int bxInEventL1Accept = 0;
    return gtPsbWord(boardIdValue, bxInEventL1Accept);
}
const edm::RefProd< L1MuGMTReadoutCollection > L1GlobalTriggerReadoutRecord::muCollectionRefProd ( ) const

get / set reference to L1MuGMTReadoutCollection

Definition at line 485 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

{

    return m_muCollRefProd;
}
bool L1GlobalTriggerReadoutRecord::operator!= ( const L1GlobalTriggerReadoutRecord result) const

unequal operator

Definition at line 159 of file L1GlobalTriggerReadoutRecord.cc.

{

    return !( result == *this);

}
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.

{

    if ( this != &result ) {

        m_gtfeWord = result.m_gtfeWord;
        m_gtFdlWord  = result.m_gtFdlWord;
        m_gtPsbWord  = result.m_gtPsbWord;

        m_muCollRefProd = result.m_muCollRefProd;

    }

    return *this;

}
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.

{

    if (m_gtfeWord != result.m_gtfeWord) {
        return false;
    }

    if (m_gtFdlWord  != result.m_gtFdlWord) {
        return false;
    }

    if (m_gtPsbWord  != result.m_gtPsbWord) {
        return false;
    }

    if (m_muCollRefProd != result.m_muCollRefProd) {
        return false;
    }

    // all members identical
    return true;

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

pretty print the content of a L1GlobalTriggerReadoutRecord

Definition at line 738 of file L1GlobalTriggerReadoutRecord.cc.

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

{

    myCout << "\n L1GlobalTriggerReadoutRecord::print \n" << std::endl;

    m_gtfeWord.print(myCout);

    for (std::vector<L1GtFdlWord>::const_iterator itFdl = m_gtFdlWord.begin();
            itFdl != m_gtFdlWord.end(); ++itFdl) {

        itFdl->print(myCout);

    }

    for (std::vector<L1GtPsbWord>::const_iterator itPsb = m_gtPsbWord.begin();
            itPsb != m_gtPsbWord.end(); ++itPsb) {

        itPsb->print(myCout);

    }

    // FIXME add  L1MuGMTReadoutCollection printing
    //    edm::RefProd<L1MuGMTReadoutCollection> m_muCollRefProd;




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

print global decision and algorithm decision word

Definition at line 417 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

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

{

    for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {

            myCout << "\nL1 Global Trigger Record: " << std::endl;

            myCout << "  Bunch cross " << bxInEventValue
            << std::endl
            << "  Global Decision = " << std::setw(5) << (*itBx).globalDecision()
            << std::endl;

            (*itBx).printGtDecisionWord(myCout);

        }
    }

    myCout << std::endl;

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

Definition at line 442 of file L1GlobalTriggerReadoutRecord.cc.

References printGtDecision().

{

    int bxInEventL1Accept = 0;
    printGtDecision(myCout, bxInEventL1Accept);

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

print technical triggers

Definition at line 451 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

Referenced by printTechnicalTrigger().

{

    for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {

            myCout << "\nL1 Global Trigger Record: " << std::endl;

            myCout << "  Bunch cross " << bxInEventValue
            << std::endl;

            (*itBx).printGtTechnicalTriggerWord(myCout);
        }
    }

    myCout << std::endl;

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

Definition at line 474 of file L1GlobalTriggerReadoutRecord.cc.

References printTechnicalTrigger().

{

    int bxInEventL1Accept = 0;
    printTechnicalTrigger(myCout, bxInEventL1Accept);

}
void L1GlobalTriggerReadoutRecord::reset ( void  )

clear the record

Definition at line 714 of file L1GlobalTriggerReadoutRecord.cc.

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

{

    m_gtfeWord.reset();

    for (std::vector<L1GtFdlWord>::iterator itFdl = m_gtFdlWord.begin();
            itFdl != m_gtFdlWord.end(); ++itFdl) {

        itFdl->reset();

    }

    for (std::vector<L1GtPsbWord>::iterator itPsb = m_gtPsbWord.begin();
            itPsb != m_gtPsbWord.end(); ++itPsb) {

        itPsb->reset();

    }

    // TODO FIXME reset m_muCollRefProd

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

set global decision, decision word and technical trigger word

Definition at line 312 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecision().

{

    for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {

            // TODO FIXME when manipulating partitions
            (*itBx).setFinalOR(static_cast<uint16_t> (t));
            return;
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << "Can not set global decision for this bx!\n"
    << std::endl;

}
void L1GlobalTriggerReadoutRecord::setDecision ( const bool &  t)

Definition at line 338 of file L1GlobalTriggerReadoutRecord.cc.

References setDecision().

{

    int bxInEventL1Accept = 0;
    setDecision(t, bxInEventL1Accept);
}
void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue,
int  bxInEventValue 
)

Definition at line 346 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setDecisionWord().

{

    for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {

            (*itBx).setGtDecisionWord (decisionWordValue);
            return;
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << "Can not set decision word for this bx!\n"
    << std::endl;

}
void L1GlobalTriggerReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue)

Definition at line 372 of file L1GlobalTriggerReadoutRecord.cc.

References setDecisionWord().

{

    int bxInEventL1Accept = 0;
    setDecisionWord(decisionWordValue, bxInEventL1Accept);

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

Definition at line 557 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

{

    // if a L1GtFdlWord exists for bxInEventValue, replace it
    for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {
            *itBx = gtFdlWordValue;
            LogTrace("L1GlobalTriggerReadoutRecord")
            << "L1GlobalTriggerReadoutRecord: replacing L1GtFdlWord for bxInEvent = "
            << bxInEventValue << "\n"
            << std::endl;
            return;
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)
    // all L1GtFdlWord are created in the record constructor for allowed bunch crosses

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: Cannot set L1GtFdlWord for bxInEvent = " << bxInEventValue
    << std::endl;

}
void L1GlobalTriggerReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue)

Definition at line 585 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtFdlWord.

{

    // just push back the new FDL block
    m_gtFdlWord.push_back(gtFdlWordValue);

}
void L1GlobalTriggerReadoutRecord::setGtfeWord ( const L1GtfeWord gtfeWordValue)

Definition at line 518 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtfeWord.

{

    m_gtfeWord = gtfeWordValue;

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

Definition at line 694 of file L1GlobalTriggerReadoutRecord.cc.

References setGtPsbWord().

{

    int bxInEventL1Accept = 0;
    setGtPsbWord(gtPsbWordValue, boardIdValue, bxInEventL1Accept);

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

Definition at line 633 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtPsbWord.

Referenced by setGtPsbWord().

{

    // if a L1GtPsbWord with the same bxInEventValue and boardIdValue exists, replace it
    for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin();
            itBx != m_gtPsbWord.end(); ++itBx) {

        if (
            ((*itBx).bxInEvent() == bxInEventValue) &&
            ((*itBx).boardId() == boardIdValue)) {

            *itBx = gtPsbWordValue;

            LogTrace("L1GlobalTriggerReadoutRecord")
            << "\nL1GlobalTriggerReadoutRecord: replacing L1GtPsbWord with boardId = "
            << std::hex << boardIdValue << std::dec
            << " and bxInEvent = " << bxInEventValue
            << "\n"
            << std::endl;
            return;
        }
    }

    // otherwise, write in the first empty PSB
    // empty means: PSB with bxInEvent = 0, boardId = 0

    for (std::vector<L1GtPsbWord>::iterator itBx = m_gtPsbWord.begin();
            itBx != m_gtPsbWord.end(); ++itBx) {

        if (
            ((*itBx).bxInEvent() == 0) &&
            ((*itBx).boardId() == 0)) {

            *itBx = gtPsbWordValue;

            LogTrace("L1GlobalTriggerReadoutRecord")
            << "\nL1GlobalTriggerReadoutRecord: filling an empty L1GtPsbWord"
            << " for PSB with boardId = "
            << std::hex << boardIdValue << std::dec
            << " and bxInEvent = " << bxInEventValue
            << "\n"
            << std::endl;
            return;
        }
    }

    // no PSB to replace, no empty PSB: throw exception (action: SkipEvent)
    // all L1GtPsbWord are created in the record constructor

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: Cannot set L1GtPsbWord for PSB with boardId = "
    << std::hex << boardIdValue << std::dec
    << " and bxInEvent = " << bxInEventValue
    << "\n  No PSB to replace and no empty PSB found!\n"
    << std::endl;


}
void L1GlobalTriggerReadoutRecord::setGtPsbWord ( const L1GtPsbWord gtPsbWordValue)

Definition at line 703 of file L1GlobalTriggerReadoutRecord.cc.

References m_gtPsbWord.

{
    // just push back the new PSB block
    m_gtPsbWord.push_back(gtPsbWordValue);

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

Definition at line 499 of file L1GlobalTriggerReadoutRecord.cc.

References m_muCollRefProd.

{

    m_muCollRefProd = refProdMuGMT;

}
void L1GlobalTriggerReadoutRecord::setTechnicalTriggerWord ( const TechnicalTriggerWord ttWordValue)

Definition at line 405 of file L1GlobalTriggerReadoutRecord.cc.

References setTechnicalTriggerWord().

{

    int bxInEventL1Accept = 0;
    setTechnicalTriggerWord(ttWordValue, bxInEventL1Accept);

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

Definition at line 381 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by setTechnicalTriggerWord().

{

    for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ((*itBx).bxInEvent() == bxInEventValue) {

            (*itBx).setGtTechnicalTriggerWord(ttWordValue);
            return;
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
            << "\nError: requested GtFdlWord for bxInEvent = "
            << bxInEventValue << " does not exist.\n"
            << "Can not set technical trigger word for this bx!\n" << std::endl;

}
const TechnicalTriggerWord & L1GlobalTriggerReadoutRecord::technicalTriggerWord ( ) const

Definition at line 302 of file L1GlobalTriggerReadoutRecord.cc.

                                                         {

    int bxInEventL1Accept = 0;
    return technicalTriggerWord(bxInEventL1Accept);

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

Definition at line 277 of file L1GlobalTriggerReadoutRecord.cc.

References LogTrace, and m_gtFdlWord.

Referenced by triggerExpression::L1TechReader::operator()().

                                                                           {
    static TechnicalTriggerWord emptyTechnicalTriggerWord;

    for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin();
            itBx != m_gtFdlWord.end(); ++itBx) {

        if ( (*itBx).bxInEvent() == bxInEventValue ) {
            return (*itBx).gtTechnicalTriggerWord();
        }
    }

    // if bunch cross not found, throw exception (action: SkipEvent)
    // TODO re-evaluate action

    //    throw cms::Exception("NotFound")
    LogTrace("L1GlobalTriggerReadoutRecord")
    << "\nError: requested GtFdlWord for bxInEvent = " << bxInEventValue
    << " does not exist.\n"
    << "Can not return technical trigger word for this bx!\n"
    << std::endl;

    return emptyTechnicalTriggerWord;
}

Friends And Related Function Documentation

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

output stream operator

Definition at line 768 of file L1GlobalTriggerReadoutRecord.cc.

{
    // TODO FIXME put together all prints
    s << "Not available yet - sorry";

    return s;

}

Member Data Documentation