CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

L1GlobalTriggerEvmReadoutRecord Class Reference

#include <L1GlobalTriggerEvmReadoutRecord.h>

List of all members.

Public Member Functions

const bool decision (int bxInEvent) const
const bool decision () const
const DecisionWord decisionWord (int bxInEvent) const
const DecisionWord decisionWord () const
const std::vector< L1GtFdlWordgtFdlVector () const
 get the vector of L1GtFdlWord
std::vector< L1GtFdlWord > & gtFdlVector ()
const L1GtFdlWord gtFdlWord (int bxInEvent) const
 get / set FDL word (record) in the GT readout record
const L1GtFdlWord gtFdlWord () const
const L1GtfeExtWord gtfeWord () const
 get / set GTFE word (record) in the GT readout record
 L1GlobalTriggerEvmReadoutRecord (int NumberBxInEvent)
 L1GlobalTriggerEvmReadoutRecord (const L1GlobalTriggerEvmReadoutRecord &)
 copy constructor
 L1GlobalTriggerEvmReadoutRecord ()
 constructors
 L1GlobalTriggerEvmReadoutRecord (const int numberBxInEvent, const int numberFdlBoards)
bool operator!= (const L1GlobalTriggerEvmReadoutRecord &) const
 unequal operator
L1GlobalTriggerEvmReadoutRecordoperator= (const L1GlobalTriggerEvmReadoutRecord &)
 assignment operator
bool operator== (const L1GlobalTriggerEvmReadoutRecord &) const
 equal operator
void print (std::ostream &myCout) const
 pretty print the content of a L1GlobalTriggerEvmReadoutRecord
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) const
void printTechnicalTrigger (std::ostream &myCout, int bxInEventValue) const
 print technical triggers
void reset ()
 clear the record
void setDecision (bool t)
void setDecision (bool t, int bxInEvent)
 set global decision and the decision word
void setDecisionWord (const DecisionWord &decisionWordValue)
void setDecisionWord (const DecisionWord &decisionWordValue, int bxInEvent)
void setGtFdlWord (const L1GtFdlWord &, int bxInEvent)
void setGtFdlWord (const L1GtFdlWord &)
void setGtfeWord (const L1GtfeExtWord &)
void setTcsWord (const L1TcsWord &)
const L1TcsWord tcsWord () const
 get / set TCS word (record) in the GT readout record
virtual ~L1GlobalTriggerEvmReadoutRecord ()
 destructor

Private Attributes

std::vector< L1GtFdlWordm_gtFdlWord
L1GtfeExtWord m_gtfeWord
L1TcsWord m_tcsWord

Friends

std::ostream & operator<< (std::ostream &, const L1GlobalTriggerEvmReadoutRecord &)
 output stream operator

Detailed Description

Description: EVM readout record for L1 Global Trigger.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Description: see header file.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 38 of file L1GlobalTriggerEvmReadoutRecord.h.


Constructor & Destructor Documentation

L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( )

constructors

Definition at line 32 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

{

    m_gtfeWord = L1GtfeExtWord();
    m_tcsWord  = L1TcsWord();

    // reserve just one L1GtFdlWord
    m_gtFdlWord.reserve(1);

}
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( int  NumberBxInEvent)

Definition at line 43 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

{

    m_gtfeWord = L1GtfeExtWord();
    m_tcsWord  = L1TcsWord();

    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);
    }

}
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( const int  numberBxInEvent,
const int  numberFdlBoards 
)

Definition at line 65 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

{

    // GTFE board
    m_gtfeWord = L1GtfeExtWord();

    // TCS board
    m_tcsWord  = L1TcsWord();

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

}
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord ( const L1GlobalTriggerEvmReadoutRecord result)

copy constructor

Definition at line 85 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

{

    m_gtfeWord = result.m_gtfeWord;
    m_tcsWord = result.m_tcsWord;
    m_gtFdlWord = result.m_gtFdlWord;

}
L1GlobalTriggerEvmReadoutRecord::~L1GlobalTriggerEvmReadoutRecord ( ) [virtual]

destructor

Definition at line 96 of file L1GlobalTriggerEvmReadoutRecord.cc.

{

    // empty now

}

Member Function Documentation

const bool L1GlobalTriggerEvmReadoutRecord::decision ( int  bxInEvent) const

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

Definition at line 155 of file L1GlobalTriggerEvmReadoutRecord.cc.

References Exception, 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)

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

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

Definition at line 200 of file L1GlobalTriggerEvmReadoutRecord.cc.

{

    int bxInEventL1Accept = 0;
    return decision(bxInEventL1Accept);
}
const DecisionWord L1GlobalTriggerEvmReadoutRecord::decisionWord ( int  bxInEvent) const

Definition at line 176 of file L1GlobalTriggerEvmReadoutRecord.cc.

References Exception, and m_gtFdlWord.

{

    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)

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

    DecisionWord dW; // empty; it does not arrive here
    return dW;
}
const DecisionWord L1GlobalTriggerEvmReadoutRecord::decisionWord ( ) const

Definition at line 208 of file L1GlobalTriggerEvmReadoutRecord.cc.

{

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

get the vector of L1GtFdlWord

Definition at line 107 of file L1GlobalTriggerEvmReadoutRecord.h.

References m_gtFdlWord.

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

Definition at line 112 of file L1GlobalTriggerEvmReadoutRecord.h.

References m_gtFdlWord.

    {
        return m_gtFdlWord;
    }
const L1GtFdlWord L1GlobalTriggerEvmReadoutRecord::gtFdlWord ( int  bxInEvent) const

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

Definition at line 379 of file L1GlobalTriggerEvmReadoutRecord.cc.

References Exception, and m_gtFdlWord.

{

    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")
    << "\nError: requested L1GtFdlWord for bx = " << bxInEventValue << " does not exist.\n"
    << std::endl;

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

}
const L1GtFdlWord L1GlobalTriggerEvmReadoutRecord::gtFdlWord ( ) const

Definition at line 401 of file L1GlobalTriggerEvmReadoutRecord.cc.

{

    int bxInEventL1Accept = 0;
    return gtFdlWord(bxInEventL1Accept);
}
const L1GtfeExtWord L1GlobalTriggerEvmReadoutRecord::gtfeWord ( ) const

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

Definition at line 349 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtfeWord.

Referenced by SiStripMonitorDigi::analyze(), and DQMProvInfo::makeGtInfo().

{

    return m_gtfeWord;

}
bool L1GlobalTriggerEvmReadoutRecord::operator!= ( const L1GlobalTriggerEvmReadoutRecord result) const

unequal operator

Definition at line 143 of file L1GlobalTriggerEvmReadoutRecord.cc.

{

    return !( result == *this);

}
L1GlobalTriggerEvmReadoutRecord & L1GlobalTriggerEvmReadoutRecord::operator= ( const L1GlobalTriggerEvmReadoutRecord result)

assignment operator

Definition at line 104 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

{

    if ( this != &result ) {

        m_gtfeWord = result.m_gtfeWord;
        m_tcsWord  = result.m_tcsWord;
        m_gtFdlWord  = result.m_gtFdlWord;

    }

    return *this;

}
bool L1GlobalTriggerEvmReadoutRecord::operator== ( const L1GlobalTriggerEvmReadoutRecord result) const

equal operator

Definition at line 121 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, and m_tcsWord.

{

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

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

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

    // all members identical
    return true;

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

pretty print the content of a L1GlobalTriggerEvmReadoutRecord

pretty print the content of a L1GlobalTriggerReadoutRecord

Definition at line 454 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord, m_gtfeWord, m_tcsWord, L1GtfeExtWord::print(), and L1TcsWord::print().

{

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

    m_gtfeWord.print(myCout);

    m_tcsWord.print(myCout);

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

        itFdl->print(myCout);

    }

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

print global decision and algorithm decision word

Definition at line 278 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord.

Referenced by printGtDecision().

{

    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
            << "\t Bunch cross " << bxInEventValue
            << std::endl
            << "\t Global Decision = " << std::setw(5) << (*itBx).globalDecision()
            << std::endl
            << "\t Decision word (bitset style) = ";

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

    myCout << std::endl;

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

Definition at line 304 of file L1GlobalTriggerEvmReadoutRecord.cc.

References printGtDecision().

{

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

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

print technical triggers

Definition at line 313 of file L1GlobalTriggerEvmReadoutRecord.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
            << "\t Bunch cross " << bxInEventValue
            << std::endl
            << "\t Technical Trigger word (bitset style) = ";

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

    myCout << std::endl;

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

Definition at line 338 of file L1GlobalTriggerEvmReadoutRecord.cc.

References printTechnicalTrigger().

{

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

}
void L1GlobalTriggerEvmReadoutRecord::reset ( void  )

clear the record

Definition at line 446 of file L1GlobalTriggerEvmReadoutRecord.cc.

{

    // TODO FIXME clear GTFE, TCS, FDL?

}
void L1GlobalTriggerEvmReadoutRecord::setDecision ( bool  t,
int  bxInEvent 
)

set global decision and the decision word

Definition at line 218 of file L1GlobalTriggerEvmReadoutRecord.cc.

References Exception, and m_gtFdlWord.

Referenced by setDecision().

{

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

        if ( (*itBx).bxInEvent() == bxInEventValue ) {
            (*itBx).setFinalOR(static_cast<uint16_t> (t)); // TODO FIXME when manipulating partitions
        }
    }

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

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

}
void L1GlobalTriggerEvmReadoutRecord::setDecision ( bool  t)

Definition at line 261 of file L1GlobalTriggerEvmReadoutRecord.cc.

References setDecision().

{

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

Definition at line 238 of file L1GlobalTriggerEvmReadoutRecord.cc.

References Exception, 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);
        }
    }

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

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

}
void L1GlobalTriggerEvmReadoutRecord::setDecisionWord ( const DecisionWord decisionWordValue)

Definition at line 268 of file L1GlobalTriggerEvmReadoutRecord.cc.

References setDecisionWord().

{

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

}
void L1GlobalTriggerEvmReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue,
int  bxInEvent 
)

Definition at line 408 of file L1GlobalTriggerEvmReadoutRecord.cc.

References Exception, LogDebug, 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;
            LogDebug("L1GlobalTriggerEvmReadoutRecord")
            << "Replacing L1GtFdlWord for bunch bx = " << 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")
    << "\nError: Cannot set L1GtFdlWord for bx = " << bxInEventValue
    << std::endl;

}
void L1GlobalTriggerEvmReadoutRecord::setGtFdlWord ( const L1GtFdlWord gtFdlWordValue)

Definition at line 434 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtFdlWord.

{

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

}
void L1GlobalTriggerEvmReadoutRecord::setGtfeWord ( const L1GtfeExtWord gtfeWordValue)

Definition at line 356 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_gtfeWord.

{

    m_gtfeWord = gtfeWordValue;

}
void L1GlobalTriggerEvmReadoutRecord::setTcsWord ( const L1TcsWord tcsWordValue)

Definition at line 371 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_tcsWord.

{

    m_tcsWord = tcsWordValue;

}
const L1TcsWord L1GlobalTriggerEvmReadoutRecord::tcsWord ( ) const

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

Definition at line 364 of file L1GlobalTriggerEvmReadoutRecord.cc.

References m_tcsWord.

{

    return m_tcsWord;

}

Friends And Related Function Documentation

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

output stream operator

Definition at line 474 of file L1GlobalTriggerEvmReadoutRecord.cc.

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

    return s;

}

Member Data Documentation