CMS 3D CMS Logo

Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes

L1GtPsbWord Class Reference

#include <L1GtPsbWord.h>

List of all members.

Public Member Functions

const cms_uint16_t aData (int iA) const
 get/set A_DATA_CH_IA
const cms_uint16_t bData (int iB) const
 get/set B_DATA_CH_IB
const cms_uint16_t boardId () const
 get/set board ID
const int bxInEvent () const
 get/set bunch cross in the GT event record
const cms_uint16_t bxNr () const
 get/set bunch cross number of the actual bx
const cms_uint32_t eventNr () const
 get/set event number since last L1 reset generated in PSB
const unsigned int getSize () const
 get the size of the PSB block in GT DAQ record (in multiple of 8 bits)
 L1GtPsbWord (cms_uint16_t boardIdValue, int bxInEventValue, cms_uint16_t bxNrValue, cms_uint32_t eventNrValue, cms_uint16_t aDataValue[NumberAData], cms_uint16_t bDataValue[NumberBData], cms_uint16_t localBxNrValue)
 constructor from unpacked values;
 L1GtPsbWord ()
 constructors
const cms_uint16_t localBxNr () const
 get/set local bunch cross number of the actual bx
bool operator!= (const L1GtPsbWord &) const
 unequal operator
bool operator== (const L1GtPsbWord &) const
 equal operator
void print (std::ostream &myCout) const
 pretty print
void reset ()
 reset the content of a L1GtPsbWord
void setAData (cms_uint16_t aDataVal, int iA)
void setAData (const cms_uint64_t &word64, int iWord)
void setADataWord64 (cms_uint64_t &word64, int iWord)
void setBData (cms_uint16_t bDataVal, int iB)
void setBData (const cms_uint64_t &word64, int iWord)
void setBDataWord64 (cms_uint64_t &word64, int iWord)
void setBoardId (const cms_uint64_t &word64, int iWord)
void setBoardId (cms_uint16_t boardIdValue)
void setBoardIdWord64 (cms_uint64_t &word64, int iWord)
void setBxInEvent (const cms_uint64_t &word64, int iWord)
void setBxInEvent (int bxInEventValue)
void setBxInEventWord64 (cms_uint64_t &word64, int iWord)
void setBxNr (const cms_uint64_t &word64, int iWord)
void setBxNr (cms_uint16_t bxNrValue)
void setBxNrWord64 (cms_uint64_t &word64, int iWord)
void setEventNr (cms_uint32_t eventNrValue)
void setEventNr (const cms_uint64_t &word64, int iWord)
void setEventNrWord64 (cms_uint64_t &word64, int iWord)
void setLocalBxNr (const cms_uint64_t &word64, int iWord)
void setLocalBxNr (cms_uint16_t localBxNrValue)
void setLocalBxNrWord64 (cms_uint64_t &word64, int iWord)
virtual ~L1GtPsbWord ()
 destructor

Static Public Attributes

static const int NumberAData = 8
static const int NumberBData = 8

Private Attributes

cms_uint16_t m_aData [NumberAData]
cms_uint16_t m_bData [NumberBData]
cms_uint16_t m_boardId
int m_bxInEvent
cms_uint16_t m_bxNr
cms_uint32_t m_eventNr
cms_uint16_t m_localBxNr

Static Private Attributes

static const int ADataCH0Word = 1
static const int ADataCH4Word = 2
static const int BDataCH0Word = 3
static const int BDataCH4Word = 4
static const int BlockSize = 6
static const cms_uint64_t BoardIdMask = 0xFFFF000000000000ULL
static const int BoardIdShift = 48
static const int BoardIdWord = 0
static const cms_uint64_t BxInEventMask = 0x0000F00000000000ULL
static const int BxInEventShift = 44
static const int BxInEventWord = 0
static const cms_uint64_t BxNrMask = 0x00000FFF00000000ULL
static const int BxNrShift = 32
static const int BxNrWord = 0
static const cms_uint64_t DataCHMask = 0x000000000000FFFFULL
static const int DataCHSize = 16
static const cms_uint64_t EventNrMask = 0x0000000000FFFFFFULL
static const int EventNrShift = 0
static const int EventNrWord = 0
static const cms_uint64_t LocalBxNrMask = 0x0000000000000FFFULL
static const int LocalBxNrShift = 0
static const int LocalBxNrWord = 5

Detailed Description

Description: PSB block in the L1 GT readout record.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 31 of file L1GtPsbWord.h.


Constructor & Destructor Documentation

L1GtPsbWord::L1GtPsbWord ( )

constructors

Definition at line 30 of file L1GtPsbWord.cc.

References m_aData, m_bData, m_boardId, m_bxInEvent, m_bxNr, m_eventNr, m_localBxNr, NumberAData, and NumberBData.

{

    m_boardId = 0;
    m_bxInEvent = 0;
    m_bxNr = 0;
    m_eventNr = 0;

    for (int iA = 0; iA < NumberAData; ++iA) {
        m_aData[iA] = 0;
    }

    for (int iB = 0; iB < NumberBData; ++iB) {
        m_bData[iB] = 0;
    }

    m_localBxNr = 0;

}
L1GtPsbWord::L1GtPsbWord ( cms_uint16_t  boardIdValue,
int  bxInEventValue,
cms_uint16_t  bxNrValue,
cms_uint32_t  eventNrValue,
cms_uint16_t  aDataValue[NumberAData],
cms_uint16_t  bDataValue[NumberBData],
cms_uint16_t  localBxNrValue 
)

constructor from unpacked values;

Definition at line 51 of file L1GtPsbWord.cc.

References m_aData, m_bData, m_boardId, m_bxInEvent, m_bxNr, m_eventNr, m_localBxNr, NumberAData, and NumberBData.

{

    m_boardId = boardIdValue;
    m_bxInEvent = bxInEventValue;
    m_bxNr = bxNrValue;
    m_eventNr = eventNrValue;

    for (int iA = 0; iA < NumberAData; ++iA) {
        m_aData[iA] = aDataValue[iA];
    }

    for (int iB = 0; iB < NumberBData; ++iB) {
        m_bData[iB] = bDataValue[iB];
    }

    m_localBxNr = localBxNrValue;

}
L1GtPsbWord::~L1GtPsbWord ( ) [virtual]

destructor

Definition at line 80 of file L1GtPsbWord.cc.

{

    // empty now

}

Member Function Documentation

const cms_uint16_t L1GtPsbWord::aData ( int  iA) const

get/set A_DATA_CH_IA

Definition at line 230 of file L1GtPsbWord.cc.

References Exception, m_aData, and NumberAData.

Referenced by L1GtDataEmulAnalyzer::comparePSB(), L1GtHwValidation::comparePSB(), EBClusterTaskExtras::determineTriggers(), EcalCosmicsHists::determineTriggers(), EEClusterTaskExtras::determineTriggers(), EcalExclusiveTrigFilter::filter(), and triggerExpression::L1TechReader::operator()().

{

    if (iA < 0 || iA > NumberAData) {
        throw cms::Exception("aDataIndexError")
        << "\nError: index for A_DATA array out of range. Allowed range: [0, "
        << NumberAData << ") " << std::endl;

    } else {
        return m_aData[iA];
    }

}
const cms_uint16_t L1GtPsbWord::bData ( int  iB) const

get/set B_DATA_CH_IB

Definition at line 325 of file L1GtPsbWord.cc.

References Exception, m_bData, and NumberBData.

Referenced by L1GtDataEmulAnalyzer::comparePSB(), L1GtHwValidation::comparePSB(), EBClusterTaskExtras::determineTriggers(), EEClusterTaskExtras::determineTriggers(), EcalCosmicsHists::determineTriggers(), EcalExclusiveTrigFilter::filter(), and triggerExpression::L1TechReader::operator()().

{

    if (iB < 0 || iB > NumberBData) {
        throw cms::Exception("bDataIndexError")
        << "\nError: index for B_DATA array out of range. Allowed range: [0, "
        << NumberBData << ") " << std::endl;

    } else {
        return m_bData[iB];
    }

}
const cms_uint16_t L1GtPsbWord::boardId ( ) const [inline]
const int L1GtPsbWord::bxInEvent ( ) const [inline]
const cms_uint16_t L1GtPsbWord::bxNr ( ) const [inline]

get/set bunch cross number of the actual bx

Definition at line 110 of file L1GtPsbWord.h.

References m_bxNr.

Referenced by L1TGT::analyze(), L1GtDataEmulAnalyzer::comparePSB(), and L1GtHwValidation::comparePSB().

    {
        return m_bxNr;
    }
const cms_uint32_t L1GtPsbWord::eventNr ( ) const [inline]

get/set event number since last L1 reset generated in PSB

Definition at line 131 of file L1GtPsbWord.h.

References m_eventNr.

Referenced by L1GtDataEmulAnalyzer::comparePSB(), and L1GtHwValidation::comparePSB().

    {
        return m_eventNr;
    }
const unsigned int L1GtPsbWord::getSize ( ) const [inline]

get the size of the PSB block in GT DAQ record (in multiple of 8 bits)

Definition at line 200 of file L1GtPsbWord.h.

References BlockSize, and L1GlobalTriggerReadoutSetup::UnitLength.

Referenced by L1GTDigiToRaw::packPSB(), L1GTDigiToRaw::produce(), L1GlobalTriggerRawToDigi::produce(), and L1GlobalTriggerRawToDigi::unpackPSB().

    {
        int unitLengthBits = L1GlobalTriggerReadoutSetup::UnitLength;

        return BlockSize*unitLengthBits;
    }
const cms_uint16_t L1GtPsbWord::localBxNr ( ) const [inline]

get/set local bunch cross number of the actual bx

Definition at line 180 of file L1GtPsbWord.h.

References m_localBxNr.

Referenced by L1TGT::analyze(), L1GtDataEmulAnalyzer::comparePSB(), and L1GtHwValidation::comparePSB().

    {
        return m_localBxNr;
    }
bool L1GtPsbWord::operator!= ( const L1GtPsbWord result) const

unequal operator

Definition at line 126 of file L1GtPsbWord.cc.

{

    return !( result == *this);

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

equal operator

Definition at line 88 of file L1GtPsbWord.cc.

References m_aData, m_bData, m_boardId, m_bxInEvent, m_bxNr, m_eventNr, m_localBxNr, NumberAData, and NumberBData.

{

    if (m_boardId != result.m_boardId) {
        return false;
    }
    if (m_bxInEvent != result.m_bxInEvent) {
        return false;
    }
    if (m_bxNr != result.m_bxNr) {
        return false;
    }
    if (m_eventNr != result.m_eventNr) {
        return false;
    }

    for (int iA = 0; iA < NumberAData; ++iA) {        
        if (m_aData[iA] != result.m_aData[iA]) {
            return false;
        }    
    }

    for (int iB = 0; iB < NumberBData; ++iB) {
        if (m_bData[iB] != result.m_bData[iB]) {
            return false;
        }
    }
    
    if (m_localBxNr != result.m_localBxNr) {
        return false;
    }

    // all members identical
    return true;

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

pretty print

Definition at line 455 of file L1GtPsbWord.cc.

References DataCHSize, i, m_aData, m_bData, m_boardId, m_bxInEvent, m_bxNr, m_eventNr, and m_localBxNr.

Referenced by L1GtPackUnpackAnalyzer::analyzeGT(), L1GtDataEmulAnalyzer::comparePSB(), L1GtHwValidation::comparePSB(), L1GTDigiToRaw::produce(), and L1GlobalTriggerRawToDigi::produce().

{

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

    myCout << "  Board Id:  "
    << std::hex << " hex:     " << std::setw(4) << std::setfill('0') << m_boardId
    << std::setfill(' ')
    << std::dec << " dec: " << m_boardId
    << std::endl;

    int baseValue = 16; // using hexadecimal values;
    int hexBxInEvent = (m_bxInEvent + baseValue)%baseValue;

    myCout << "  BxInEvent: "
    << std::hex << " hex:     " << "   " << std::setw(1) << hexBxInEvent
    << std::dec << " dec: " << m_bxInEvent
    << std::endl;

    myCout << "  BxNr:      "
    << std::hex << " hex:     "  << " " << std::setw(3) << std::setfill('0') << m_bxNr
    << std::setfill(' ')
    << std::dec << " dec: " << m_bxNr
    << std::endl;


    myCout << "  EventNr:   "
    << std::hex << " hex: " << "  " << std::setw(6) << std::setfill('0') << m_eventNr
    << std::setfill(' ')
    << std::dec << " dec: " << m_eventNr
    << std::endl;

    int sizeW64 = 64;
    int dataBlocksPerLine = sizeW64/DataCHSize; // 4x16 bits per line

    myCout << "\n        "
    << "A_Data_CH3 "
    << "A_Data_CH2 "
    << "A_Data_CH1 "
    << "A_Data_CH0 " << "\n"
    << std::hex << "  hex:  " << std::setfill('0');

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(4) <<  m_aData[iCh] << "       ";

    }

    myCout << "\n"
    << std::dec << "  dec:  ";

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(5) <<  m_aData[iCh] << "      ";

    }

    myCout << "\n\n        "
    << "A_Data_CH7 "
    << "A_Data_CH6 "
    << "A_Data_CH5 "
    << "A_Data_CH4 " << "\n"
    << std::hex << "  hex:  " << std::setfill('0');

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(4) <<  m_aData[iCh + dataBlocksPerLine] << "       ";

    }

    myCout << "\n"
    << std::dec << "  dec:  ";

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(5) <<  m_aData[iCh + dataBlocksPerLine] << "      ";

    }

    myCout << std::endl;

    myCout << "\n        "
    << "B_Data_CH3 "
    << "B_Data_CH2 "
    << "B_Data_CH1 "
    << "B_Data_CH0 " << "\n"
    << std::hex << "  hex:  " << std::setfill('0');

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(4) <<  m_bData[iCh] << "       ";

    }

    myCout << "\n"
    << std::dec << "  dec:  ";

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(5) <<  m_bData[iCh] << "      ";

    }

    myCout << "\n\n        "
    << "B_Data_CH7 "
    << "B_Data_CH6 "
    << "B_Data_CH5 "
    << "B_Data_CH4 " << "\n"
    << std::hex << "  hex:  " << std::setfill('0');

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(4) <<  m_bData[iCh + dataBlocksPerLine] << "       ";

    }

    myCout << "\n"
    << std::dec << "  dec:  ";

    for (int i = 0; i < dataBlocksPerLine; ++i) {

        int iCh = dataBlocksPerLine - (i + 1); // reverse
        myCout << std::setw(5) <<  m_bData[iCh + dataBlocksPerLine] << "      ";

    }

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

    myCout << "  LocalBxNr: "
    << std::hex << " hex:     "  << " " << std::setw(3) << std::setfill('0') << m_localBxNr
    << std::setfill(' ')
    << std::dec << " dec: " << m_localBxNr
    << std::endl;

}
void L1GtPsbWord::reset ( void  )

reset the content of a L1GtPsbWord

Definition at line 434 of file L1GtPsbWord.cc.

References m_aData, m_bData, m_boardId, m_bxInEvent, m_bxNr, m_eventNr, m_localBxNr, NumberAData, and NumberBData.

Referenced by L1GlobalTriggerRawToDigi::produce().

{

    m_boardId = 0;
    m_bxInEvent = 0;
    m_bxNr = 0;
    m_eventNr = 0;

    for (int iA = 0; iA < NumberAData; ++iA) {
        m_aData[iA] = 0;
    }

    for (int iB = 0; iB < NumberBData; ++iB) {
        m_bData[iB] = 0;
    }

    m_localBxNr = 0;

}
void L1GtPsbWord::setAData ( cms_uint16_t  aDataVal,
int  iA 
)

Definition at line 244 of file L1GtPsbWord.cc.

References Exception, m_aData, and NumberAData.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and L1GlobalTriggerRawToDigi::unpackPSB().

{

    if (iA < 0 || iA > NumberAData) {
        throw cms::Exception("aDataIndexError")
        << "\nError: index for A_DATA array out of range. Allowed range: [0, "
        << NumberAData << ") " << std::endl;

    } else {
        m_aData[iA] = aDataVal;
    }

}
void L1GtPsbWord::setAData ( const cms_uint64_t word64,
int  iWord 
)

set the AData value from a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 260 of file L1GtPsbWord.cc.

References ADataCH0Word, ADataCH4Word, DataCHSize, i, and m_aData.

{

    int sizeW64 = sizeof(word64)*8;
    int nSubWords = sizeW64/DataCHSize;

    if (iWord == ADataCH0Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            m_aData[i] = (word64 & (DataCHMask << dataShift)) >> dataShift;

            //            LogTrace("L1GtPsbWord")
            //            << "\n  A_Data_CH" << i << " = "
            //            << m_aData[i]
            //            << std::endl;

        }

    } else if (iWord == ADataCH4Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            m_aData[i + nSubWords] = (word64 & (DataCHMask << dataShift)) >> dataShift;

            //            LogTrace("L1GtPsbWord")
            //            << "\n  A_Data_CH" << i + nSubWords << " = "
            //            << m_aData[i]
            //            << std::endl;
        }

    }

}
void L1GtPsbWord::setADataWord64 ( cms_uint64_t word64,
int  iWord 
)

set the AData value in a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 297 of file L1GtPsbWord.cc.

References ADataCH0Word, ADataCH4Word, DataCHSize, i, and m_aData.

Referenced by L1GTDigiToRaw::packPSB().

{

    int sizeW64 = sizeof(word64)*8;
    int nSubWords = sizeW64/DataCHSize;

    if (iWord == ADataCH0Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            word64 = word64 | (static_cast<cms_uint64_t> (m_aData[i]) << dataShift);
        }

    }
    else if (iWord == ADataCH4Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            word64 = word64 |
                     (static_cast<cms_uint64_t> (m_aData[i + nSubWords]) << dataShift);
        }

    }

}
void L1GtPsbWord::setBData ( const cms_uint64_t word64,
int  iWord 
)

set the BData value from a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 355 of file L1GtPsbWord.cc.

References BDataCH0Word, BDataCH4Word, DataCHSize, i, and m_bData.

{

    int sizeW64 = sizeof(word64)*8;
    int nSubWords = sizeW64/DataCHSize;

    if (iWord == BDataCH0Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            m_bData[i] = (word64 & (DataCHMask << dataShift)) >> dataShift;
        }

    } else if (iWord == BDataCH4Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            m_bData[i + nSubWords] = (word64 & (DataCHMask << dataShift)) >> dataShift;
        }

    }

}
void L1GtPsbWord::setBData ( cms_uint16_t  bDataVal,
int  iB 
)

Definition at line 339 of file L1GtPsbWord.cc.

References Exception, m_bData, and NumberBData.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and L1GlobalTriggerRawToDigi::unpackPSB().

{

    if (iB < 0 || iB > NumberBData) {
        throw cms::Exception("bDataIndexError")
        << "\nError: index for B_DATA array out of range. Allowed range: [0, "
        << NumberBData << ") " << std::endl;

    } else {
        m_bData[iB] = bDataVal;
    }

}
void L1GtPsbWord::setBDataWord64 ( cms_uint64_t word64,
int  iWord 
)

set the BData value in a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 381 of file L1GtPsbWord.cc.

References BDataCH0Word, BDataCH4Word, DataCHSize, i, and m_bData.

Referenced by L1GTDigiToRaw::packPSB().

{

    int sizeW64 = sizeof(word64)*8;
    int nSubWords = sizeW64/DataCHSize;

    if (iWord == BDataCH0Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            word64 = word64 | (static_cast<cms_uint64_t> (m_bData[i]) << dataShift);
        }

    }
    else if (iWord == BDataCH4Word) {

        for (int i = 0; i < nSubWords; ++i) {
            int dataShift = i*DataCHSize;
            word64 = word64 |
                     (static_cast<cms_uint64_t> (m_bData[i + nSubWords]) << dataShift);
        }

    }

}
void L1GtPsbWord::setBoardId ( cms_uint16_t  boardIdValue) [inline]

Definition at line 73 of file L1GtPsbWord.h.

References m_boardId.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and L1GlobalTriggerRawToDigi::unpackPSB().

    {
        m_boardId = boardIdValue;
    }
void L1GtPsbWord::setBoardId ( const cms_uint64_t word64,
int  iWord 
)

set the BoardId value from a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 138 of file L1GtPsbWord.cc.

References BoardIdMask, BoardIdShift, BoardIdWord, and m_boardId.

{
    if (iWord == BoardIdWord) {
        m_boardId = (word64 & BoardIdMask) >> BoardIdShift;
    }

}
void L1GtPsbWord::setBoardIdWord64 ( cms_uint64_t word64,
int  iWord 
)

set the BoardId value in a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 148 of file L1GtPsbWord.cc.

References BoardIdShift, BoardIdWord, and m_boardId.

Referenced by L1GTDigiToRaw::packPSB().

{

    if (iWord == BoardIdWord) {
        word64 = word64 | (static_cast<cms_uint64_t> (m_boardId) << BoardIdShift);
    }

}
void L1GtPsbWord::setBxInEvent ( const cms_uint64_t word64,
int  iWord 
)

set the BxInEvent value from a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 160 of file L1GtPsbWord.cc.

References BxInEventMask, BxInEventShift, BxInEventWord, and m_bxInEvent.

{
    if (iWord == BxInEventWord) {
        int baseValue = 16; // using hexadecimal values;
        int hexBxInEvent = (word64 & BxInEventMask) >> BxInEventShift;
        m_bxInEvent = (hexBxInEvent + baseValue/2)%baseValue - baseValue/2;
    }

}
void L1GtPsbWord::setBxInEvent ( int  bxInEventValue) [inline]

Definition at line 94 of file L1GtPsbWord.h.

References m_bxInEvent.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and L1GlobalTriggerRawToDigi::unpackPSB().

    {
        m_bxInEvent = bxInEventValue;
    }
void L1GtPsbWord::setBxInEventWord64 ( cms_uint64_t word64,
int  iWord 
)

set the BxInEvent value in a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 172 of file L1GtPsbWord.cc.

References BxInEventShift, BxInEventWord, and m_bxInEvent.

Referenced by L1GTDigiToRaw::packPSB().

{

    if (iWord == BxInEventWord) {
        int baseValue = 16; // using hexadecimal values;
        int hexBxInEvent = (m_bxInEvent + baseValue)%baseValue;
        word64 = word64 | (static_cast<cms_uint64_t> (hexBxInEvent)
                           << BxInEventShift);
    }

}
void L1GtPsbWord::setBxNr ( cms_uint16_t  bxNrValue) [inline]

Definition at line 115 of file L1GtPsbWord.h.

References m_bxNr.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and L1GlobalTriggerRawToDigi::unpackPSB().

    {
        m_bxNr = bxNrValue;
    }
void L1GtPsbWord::setBxNr ( const cms_uint64_t word64,
int  iWord 
)

set the BxNr value from a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 186 of file L1GtPsbWord.cc.

References BxNrMask, BxNrShift, BxNrWord, and m_bxNr.

{

    if (iWord == BxNrWord) {
        m_bxNr = (word64 & BxNrMask) >> BxNrShift;
    }

}
void L1GtPsbWord::setBxNrWord64 ( cms_uint64_t word64,
int  iWord 
)

set the BxNr value in a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 197 of file L1GtPsbWord.cc.

References BxNrShift, BxNrWord, and m_bxNr.

Referenced by L1GTDigiToRaw::packPSB().

{

    if (iWord == BxNrWord) {
        word64 = word64 | (static_cast<cms_uint64_t> (m_bxNr) << BxNrShift);
    }

}
void L1GtPsbWord::setEventNr ( const cms_uint64_t word64,
int  iWord 
)

set the EventNr value from a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 208 of file L1GtPsbWord.cc.

References EventNrMask, EventNrShift, EventNrWord, and m_eventNr.

{
    if (iWord == EventNrWord) {
        m_eventNr = (word64 & EventNrMask) >> EventNrShift;
    }

}
void L1GtPsbWord::setEventNr ( cms_uint32_t  eventNrValue) [inline]

Definition at line 136 of file L1GtPsbWord.h.

References m_eventNr.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and L1GlobalTriggerRawToDigi::unpackPSB().

    {
        m_eventNr = eventNrValue;
    }
void L1GtPsbWord::setEventNrWord64 ( cms_uint64_t word64,
int  iWord 
)

set the EventNr value in a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 218 of file L1GtPsbWord.cc.

References EventNrShift, EventNrWord, and m_eventNr.

Referenced by L1GTDigiToRaw::packPSB().

{

    if (iWord == EventNrWord) {
        word64 = word64 | (static_cast<cms_uint64_t> (m_eventNr) << EventNrShift);
    }

}
void L1GtPsbWord::setLocalBxNr ( const cms_uint64_t word64,
int  iWord 
)

set the local bunch cross number bits from a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 410 of file L1GtPsbWord.cc.

References LocalBxNrMask, LocalBxNrShift, LocalBxNrWord, and m_localBxNr.

{
    if (iWord == LocalBxNrWord) {
        m_localBxNr = (word64 & LocalBxNrMask) >> LocalBxNrShift;
    }

}
void L1GtPsbWord::setLocalBxNr ( cms_uint16_t  localBxNrValue) [inline]

Definition at line 185 of file L1GtPsbWord.h.

References m_localBxNr.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), and L1GlobalTriggerRawToDigi::unpackPSB().

    {
        m_localBxNr = localBxNrValue;
    }
void L1GtPsbWord::setLocalBxNrWord64 ( cms_uint64_t word64,
int  iWord 
)

set the local bunch cross number bits in a 64-bits word, having the index iWord in the GTFE raw record

Definition at line 420 of file L1GtPsbWord.cc.

References LocalBxNrShift, LocalBxNrWord, and m_localBxNr.

Referenced by L1GTDigiToRaw::packPSB().

{

    if (iWord == LocalBxNrWord) {
        word64 = word64 | (static_cast<cms_uint64_t> (m_localBxNr)
                           << LocalBxNrShift);
    }

}

Member Data Documentation

const int L1GtPsbWord::ADataCH0Word = 1 [static, private]

Definition at line 248 of file L1GtPsbWord.h.

Referenced by setAData(), and setADataWord64().

const int L1GtPsbWord::ADataCH4Word = 2 [static, private]

Definition at line 251 of file L1GtPsbWord.h.

Referenced by setAData(), and setADataWord64().

const int L1GtPsbWord::BDataCH0Word = 3 [static, private]

Definition at line 254 of file L1GtPsbWord.h.

Referenced by setBData(), and setBDataWord64().

const int L1GtPsbWord::BDataCH4Word = 4 [static, private]

Definition at line 257 of file L1GtPsbWord.h.

Referenced by setBData(), and setBDataWord64().

const int L1GtPsbWord::BlockSize = 6 [static, private]

Definition at line 221 of file L1GtPsbWord.h.

Referenced by getSize().

const cms_uint64_t L1GtPsbWord::BoardIdMask = 0xFFFF000000000000ULL [static, private]

Definition at line 232 of file L1GtPsbWord.h.

Referenced by setBoardId().

const int L1GtPsbWord::BoardIdShift = 48 [static, private]

Definition at line 238 of file L1GtPsbWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

const int L1GtPsbWord::BoardIdWord = 0 [static, private]

Definition at line 226 of file L1GtPsbWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

const cms_uint64_t L1GtPsbWord::BxInEventMask = 0x0000F00000000000ULL [static, private]

Definition at line 233 of file L1GtPsbWord.h.

Referenced by setBxInEvent().

const int L1GtPsbWord::BxInEventShift = 44 [static, private]

Definition at line 239 of file L1GtPsbWord.h.

Referenced by setBxInEvent(), and setBxInEventWord64().

const int L1GtPsbWord::BxInEventWord = 0 [static, private]

Definition at line 227 of file L1GtPsbWord.h.

Referenced by setBxInEvent(), and setBxInEventWord64().

const cms_uint64_t L1GtPsbWord::BxNrMask = 0x00000FFF00000000ULL [static, private]

Definition at line 234 of file L1GtPsbWord.h.

Referenced by setBxNr().

const int L1GtPsbWord::BxNrShift = 32 [static, private]

Definition at line 240 of file L1GtPsbWord.h.

Referenced by setBxNr(), and setBxNrWord64().

const int L1GtPsbWord::BxNrWord = 0 [static, private]

Definition at line 228 of file L1GtPsbWord.h.

Referenced by setBxNr(), and setBxNrWord64().

const cms_uint64_t L1GtPsbWord::DataCHMask = 0x000000000000FFFFULL [static, private]

Definition at line 245 of file L1GtPsbWord.h.

const int L1GtPsbWord::DataCHSize = 16 [static, private]

Definition at line 244 of file L1GtPsbWord.h.

Referenced by print(), setAData(), setADataWord64(), setBData(), and setBDataWord64().

const cms_uint64_t L1GtPsbWord::EventNrMask = 0x0000000000FFFFFFULL [static, private]

Definition at line 235 of file L1GtPsbWord.h.

Referenced by setEventNr().

const int L1GtPsbWord::EventNrShift = 0 [static, private]

Definition at line 241 of file L1GtPsbWord.h.

Referenced by setEventNr(), and setEventNrWord64().

const int L1GtPsbWord::EventNrWord = 0 [static, private]

Definition at line 229 of file L1GtPsbWord.h.

Referenced by setEventNr(), and setEventNrWord64().

const cms_uint64_t L1GtPsbWord::LocalBxNrMask = 0x0000000000000FFFULL [static, private]

Definition at line 261 of file L1GtPsbWord.h.

Referenced by setLocalBxNr().

const int L1GtPsbWord::LocalBxNrShift = 0 [static, private]

Definition at line 262 of file L1GtPsbWord.h.

Referenced by setLocalBxNr(), and setLocalBxNrWord64().

const int L1GtPsbWord::LocalBxNrWord = 5 [static, private]

Definition at line 260 of file L1GtPsbWord.h.

Referenced by setLocalBxNr(), and setLocalBxNrWord64().

Definition at line 281 of file L1GtPsbWord.h.

Referenced by aData(), L1GtPsbWord(), operator==(), print(), reset(), setAData(), and setADataWord64().

Definition at line 283 of file L1GtPsbWord.h.

Referenced by bData(), L1GtPsbWord(), operator==(), print(), reset(), setBData(), and setBDataWord64().

Definition at line 272 of file L1GtPsbWord.h.

Referenced by boardId(), L1GtPsbWord(), operator==(), print(), reset(), setBoardId(), and setBoardIdWord64().

int L1GtPsbWord::m_bxInEvent [private]

Definition at line 278 of file L1GtPsbWord.h.

Referenced by bxNr(), L1GtPsbWord(), operator==(), print(), reset(), setBxNr(), and setBxNrWord64().

Definition at line 279 of file L1GtPsbWord.h.

Referenced by eventNr(), L1GtPsbWord(), operator==(), print(), reset(), setEventNr(), and setEventNrWord64().

const int L1GtPsbWord::NumberAData = 8 [static]
const int L1GtPsbWord::NumberBData = 8 [static]