CMS 3D CMS Logo

Public Member Functions | Private Attributes | Static Private Attributes

L1TcsWord Class Reference

#include <L1TcsWord.h>

List of all members.

Public Member Functions

const boost::uint32_t assignedPartitions () const
 get/set assigned partition: bit "i" correspond to detector partition "i"
const boost::uint16_t boardId () const
 get/set board ID
const boost::uint16_t bxNr () const
 get/set bunch cross number as counted in the TCS chip
const boost::uint16_t daqNr () const
 get/set number of DAQ partition to which the L1A has been sent
const boost::uint32_t eventNr () const
 get/set event number since last L1 reset generated in TCS chip
const unsigned int getSize () const
 get the size of the TCS block in GT EVM record (in multiple of 8 bits)
 L1TcsWord (boost::uint16_t boardIdValue, boost::uint16_t bxNrValue, boost::uint16_t daqNrValue, boost::uint16_t triggerTypeValue, boost::uint16_t statusValue, boost::uint16_t luminositySegmentNrValue, boost::uint32_t partRunNrValue, boost::uint32_t assignedPartitionsValue, boost::uint32_t partTrigNrValue, boost::uint32_t eventNrValue, boost::uint64_t orbitNrValue)
 constructor from unpacked values;
 L1TcsWord ()
 constructors
const boost::uint16_t luminositySegmentNr () const
 get/set luminosity segment number
bool operator!= (const L1TcsWord &) const
 unequal operator
bool operator== (const L1TcsWord &) const
 equal operator
const boost::uint64_t orbitNr () const
 get/set orbit number since start of run
const boost::uint32_t partRunNr () const
 get/set partition run number
const boost::uint32_t partTrigNr () const
 get/set total number of L1A sent since start of the run to this DAQ partition
void print (std::ostream &myCout) const
 pretty print the content of a L1TcsWord
void reset ()
 reset the content of a L1TcsWord
void setAssignedPartitions (const boost::uint32_t assignedPartitionsValue)
void setAssignedPartitions (const boost::uint64_t &word64)
 set the AssignedPartitions value from a 64-bits word
void setAssignedPartitionsWord64 (boost::uint64_t &word64, int iWord)
void setBoardId (const boost::uint64_t &word64)
 set the BoardId value from a 64-bits word
void setBoardId (const boost::uint16_t boardIdValue)
 set BoardId from a BoardId value
void setBoardIdWord64 (boost::uint64_t &word64, int iWord)
void setBxNr (const boost::uint16_t bxNrValue)
void setBxNr (const boost::uint64_t &word64)
 set the BxNr value from a 64-bits word
void setBxNrWord64 (boost::uint64_t &word64, int iWord)
void setDaqNr (const boost::uint64_t &word64)
 set the DaqNr value from a 64-bits word
void setDaqNr (const boost::uint16_t daqNrValue)
void setDaqNrWord64 (boost::uint64_t &word64, int iWord)
void setEventNr (const boost::uint32_t eventNrValue)
void setEventNr (const boost::uint64_t &word64)
 set the EventNr value from a 64-bits word
void setEventNrWord64 (boost::uint64_t &word64, int iWord)
void setLuminositySegmentNr (const boost::uint16_t luminositySegmentNrValue)
void setLuminositySegmentNr (const boost::uint64_t &word64)
 set the luminosity segment number value from a 64-bits word
void setLuminositySegmentNrWord64 (boost::uint64_t &word64, int iWord)
void setOrbitNr (const boost::uint64_t orbitNrValue)
void setOrbitNrFrom (const boost::uint64_t &word64)
 set the OrbitNr value from a 64-bits word
void setOrbitNrWord64 (boost::uint64_t &word64, int iWord)
void setPartRunNr (const boost::uint64_t &word64)
 set the PartRunNr value from a 64-bits word
void setPartRunNr (const boost::uint32_t partRunNrValue)
void setPartRunNrWord64 (boost::uint64_t &word64, int iWord)
void setPartTrigNr (const boost::uint32_t partTrigNrValue)
void setPartTrigNr (const boost::uint64_t &word64)
 set the PartTrigNr value from a 64-bits word
void setPartTrigNrWord64 (boost::uint64_t &word64, int iWord)
void setStatus (const boost::uint64_t &word64)
 set the Status value from a 64-bits word
void setStatus (const boost::uint16_t statusValue)
void setStatusWord64 (boost::uint64_t &word64, int iWord)
void setTriggerType (const boost::uint64_t &word64)
 set the TriggerType value from a 64-bits word
void setTriggerType (const boost::uint16_t triggerTypeValue)
void setTriggerTypeWord64 (boost::uint64_t &word64, int iWord)
const boost::uint16_t status () const
 get/set status: 0000 = normal rate; 1000 = low rate = warning
const boost::uint16_t triggerType () const
 get/set trigger type, identical with event type in CMS header
void unpack (const unsigned char *tcsPtr)
virtual ~L1TcsWord ()
 destructor

Private Attributes

boost::uint32_t m_assignedPartitions
boost::uint16_t m_boardId
 board identifier
boost::uint16_t m_bxNr
 bunch cross number as counted in the TCS chip
boost::uint16_t m_daqNr
 number of DAQ partition to which the L1A has been sent
boost::uint32_t m_eventNr
 event number since last L1 reset generated in TCS chip
boost::uint16_t m_luminositySegmentNr
 luminosity segment number
boost::uint64_t m_orbitNr
 orbit number since start of run (48 bits, in fact)
boost::uint32_t m_partRunNr
 partition run number
boost::uint32_t m_partTrigNr
boost::uint16_t m_status
 0000 = normal rate; 1000 = low rate = warning
boost::uint16_t m_triggerType
 trigger type, identical with event type in CMS header (event type)

Static Private Attributes

static const boost::uint64_t AssignedPartitionsMask = 0x00000000FFFFFFFFULL
static const int AssignedPartitionsShift = 0
static const int AssignedPartitionsWord = 1
static const int BlockSize = 5
static const boost::uint64_t BoardIdMask = 0xFFFF000000000000ULL
static const int BoardIdShift = 48
static const int BoardIdWord = 0
static const boost::uint64_t BxNrMask = 0x00000FFF00000000ULL
static const int BxNrShift = 32
static const int BxNrWord = 0
static const boost::uint64_t DaqNrMask = 0x000000000F000000ULL
static const int DaqNrShift = 24
static const int DaqNrWord = 0
static const boost::uint64_t EventNrMask = 0x00000000FFFFFFFFULL
static const int EventNrShift = 0
static const int EventNrWord = 2
static const boost::uint64_t LuminositySegmentNrMask = 0x000000000000FFFFULL
static const int LuminositySegmentNrShift = 0
static const int LuminositySegmentNrWord = 0
static const boost::uint64_t OrbitNrMask = 0x0000FFFFFFFFFFFFULL
static const int OrbitNrShift = 0
static const int OrbitNrWord = 3
static const boost::uint64_t PartRunNrMask = 0xFFFFFFFF00000000ULL
static const int PartRunNrShift = 32
static const int PartRunNrWord = 1
static const boost::uint64_t PartTrigNrMask = 0xFFFFFFFF00000000ULL
static const int PartTrigNrShift = 32
static const int PartTrigNrWord = 2
static const boost::uint64_t StatusMask = 0x00000000000F0000ULL
static const int StatusShift = 16
static const int StatusWord = 0
static const boost::uint64_t TriggerTypeMask = 0x0000000000F00000ULL
static const int TriggerTypeShift = 20
static const int TriggerTypeWord = 0

Detailed Description

Description: L1 Global Trigger - TCS words in the readout record.

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 31 of file L1TcsWord.h.


Constructor & Destructor Documentation

L1TcsWord::L1TcsWord ( )
L1TcsWord::L1TcsWord ( boost::uint16_t  boardIdValue,
boost::uint16_t  bxNrValue,
boost::uint16_t  daqNrValue,
boost::uint16_t  triggerTypeValue,
boost::uint16_t  statusValue,
boost::uint16_t  luminositySegmentNrValue,
boost::uint32_t  partRunNrValue,
boost::uint32_t  assignedPartitionsValue,
boost::uint32_t  partTrigNrValue,
boost::uint32_t  eventNrValue,
boost::uint64_t  orbitNrValue 
)

constructor from unpacked values;

Definition at line 50 of file L1TcsWord.cc.

References m_assignedPartitions, m_boardId, m_bxNr, m_daqNr, m_eventNr, m_luminositySegmentNr, m_orbitNr, m_partRunNr, m_partTrigNr, m_status, and m_triggerType.

{

    m_boardId = boardIdValue;
    m_bxNr = bxNrValue;
    m_daqNr = daqNrValue;
    m_triggerType = triggerTypeValue;
    m_status = statusValue;
    m_luminositySegmentNr = luminositySegmentNrValue;
    m_partRunNr = partRunNrValue;
    m_assignedPartitions = assignedPartitionsValue;
    m_partTrigNr = partTrigNrValue;
    m_eventNr = eventNrValue;
    m_orbitNr = orbitNrValue;

}
L1TcsWord::~L1TcsWord ( ) [virtual]

destructor

Definition at line 79 of file L1TcsWord.cc.

{

    // empty

}

Member Function Documentation

const boost::uint32_t L1TcsWord::assignedPartitions ( ) const [inline]

get/set assigned partition: bit "i" correspond to detector partition "i"

Definition at line 208 of file L1TcsWord.h.

References m_assignedPartitions.

    {
        return m_assignedPartitions;
    }
const boost::uint16_t L1TcsWord::boardId ( ) const [inline]

get/set board ID

get BoardId value

Definition at line 68 of file L1TcsWord.h.

References m_boardId.

    {
        return m_boardId;
    }
const boost::uint16_t L1TcsWord::bxNr ( ) const [inline]

get/set bunch cross number as counted in the TCS chip

Definition at line 89 of file L1TcsWord.h.

References m_bxNr.

Referenced by L1TGT::analyze().

    {
        return m_bxNr;
    }
const boost::uint16_t L1TcsWord::daqNr ( ) const [inline]

get/set number of DAQ partition to which the L1A has been sent

Definition at line 109 of file L1TcsWord.h.

References m_daqNr.

    {
        return m_daqNr;
    }
const boost::uint32_t L1TcsWord::eventNr ( ) const [inline]

get/set event number since last L1 reset generated in TCS chip

Definition at line 248 of file L1TcsWord.h.

References m_eventNr.

Referenced by L1TGT::analyze().

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

get the size of the TCS block in GT EVM record (in multiple of 8 bits)

Definition at line 287 of file L1TcsWord.h.

References BlockSize, and L1GlobalTriggerReadoutSetup::UnitLength.

Referenced by L1GTEvmDigiToRaw::packTCS(), L1GTEvmDigiToRaw::produce(), L1GlobalTriggerEvmRawToDigi::produce(), and L1GTDigiToRaw::produce().

    {
        int unitLengthBits = L1GlobalTriggerReadoutSetup::UnitLength;

        return BlockSize*unitLengthBits;
    }
const boost::uint16_t L1TcsWord::luminositySegmentNr ( ) const [inline]

get/set luminosity segment number

Definition at line 168 of file L1TcsWord.h.

References m_luminositySegmentNr.

Referenced by L1GlobalTriggerEvmRawToDigi::produce().

    {
        return m_luminositySegmentNr;
    }
bool L1TcsWord::operator!= ( const L1TcsWord result) const

unequal operator

Definition at line 140 of file L1TcsWord.cc.

{

    return !( result == *this);

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

equal operator

Definition at line 87 of file L1TcsWord.cc.

References m_assignedPartitions, m_boardId, m_bxNr, m_daqNr, m_eventNr, m_luminositySegmentNr, m_orbitNr, m_partRunNr, m_partTrigNr, m_status, and m_triggerType.

{

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

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

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

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

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

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

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

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

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

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

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

    // all members identical
    return true;

}
const boost::uint64_t L1TcsWord::orbitNr ( ) const [inline]

get/set orbit number since start of run

Definition at line 268 of file L1TcsWord.h.

References m_orbitNr.

Referenced by L1TGT::analyze().

    {
        return m_orbitNr;
    }
const boost::uint32_t L1TcsWord::partRunNr ( ) const [inline]

get/set partition run number

Definition at line 188 of file L1TcsWord.h.

References m_partRunNr.

    {
        return m_partRunNr;
    }
const boost::uint32_t L1TcsWord::partTrigNr ( ) const [inline]

get/set total number of L1A sent since start of the run to this DAQ partition

Definition at line 228 of file L1TcsWord.h.

References m_partTrigNr.

Referenced by L1TGT::analyze().

    {
        return m_partTrigNr;
    }
void L1TcsWord::print ( std::ostream &  myCout) const

pretty print the content of a L1TcsWord

Definition at line 405 of file L1TcsWord.cc.

References m_assignedPartitions, m_boardId, m_bxNr, m_daqNr, m_eventNr, m_luminositySegmentNr, m_orbitNr, m_partRunNr, m_partTrigNr, m_status, and m_triggerType.

Referenced by L1GlobalTriggerEvmReadoutRecord::print(), L1GTEvmDigiToRaw::produce(), and L1GlobalTriggerEvmRawToDigi::produce().

{

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

    int iWord = 0;

    myCout << "\n Word " << iWord << 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;


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


    myCout << "  DaqNr:               "
    << std::hex << " hex: " << "           " << std::setw(1) << m_daqNr
    << std::dec << " dec: " << m_daqNr
    << std::endl;

    myCout << "  TriggerType:         "
    << std::hex << " hex: " << "           " << std::setw(1) << m_triggerType
    << std::dec << " dec: " << m_triggerType
    << std::endl;

    myCout << "  Status:              "
    << std::hex << " hex: " << "           " << std::setw(1) << m_status
    << std::dec << " dec: " << m_status
    << std::endl;

    myCout << "  LuminositySegmentNr: "
    << std::hex << " hex: " << "        " << std::setw(4) << m_luminositySegmentNr
    << std::dec << " dec: " << m_luminositySegmentNr
    << std::endl;


    iWord++;
    myCout << "\n Word " << iWord << std::endl;

    myCout << "  PartRunNr:           "
    << std::hex << " hex: " << "    " << std::setw(8) << std::setfill('0') << m_partRunNr
    << std::setfill(' ')
    << std::dec << " dec: " << m_partRunNr
    << std::endl;

    myCout << "  AssignedPartitions:  "
    << std::hex << " hex: " << "    " << std::setw(8) << std::setfill('0')
    << m_assignedPartitions
    << std::setfill(' ')
    << std::dec << " dec: " << m_assignedPartitions
    << std::endl;


    iWord++;
    myCout << "\n Word " << iWord << std::endl;

    myCout << "  PartTrigNr:          "
    << std::hex << " hex: " << "    " << std::setw(8) << std::setfill('0') << m_partTrigNr
    << std::setfill(' ')
    << std::dec << " dec: " << m_partTrigNr
    << std::endl;


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

    iWord++;
    myCout << "\n Word " << iWord << std::endl;

    myCout << "  OrbitNr:             "
    << std::hex << " hex: " << "" << std::setw(12) << std::setfill('0') << m_orbitNr
    << std::setfill(' ')
    << std::dec << " dec: " << m_orbitNr
    << std::endl;

    iWord++;
    myCout << "\n Word " << iWord << std::endl;

    myCout << "  Empty word          "
    << std::endl;

}
void L1TcsWord::reset ( void  )
void L1TcsWord::setAssignedPartitions ( const boost::uint32_t  assignedPartitionsValue) [inline]

Definition at line 213 of file L1TcsWord.h.

References m_assignedPartitions.

Referenced by unpack().

    {
        m_assignedPartitions = assignedPartitionsValue;
    }
void L1TcsWord::setAssignedPartitions ( const boost::uint64_t &  word64)

set the AssignedPartitions value from a 64-bits word

Definition at line 297 of file L1TcsWord.cc.

References AssignedPartitionsMask, AssignedPartitionsShift, and m_assignedPartitions.

void L1TcsWord::setAssignedPartitionsWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 307 of file L1TcsWord.cc.

References AssignedPartitionsShift, AssignedPartitionsWord, and m_assignedPartitions.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == AssignedPartitionsWord) {
        word64 = word64 |
                 (static_cast<boost::uint64_t> (m_assignedPartitions)
                  << AssignedPartitionsShift);
    }

}
void L1TcsWord::setBoardId ( const boost::uint16_t  boardIdValue) [inline]

set BoardId from a BoardId value

Definition at line 74 of file L1TcsWord.h.

References m_boardId.

Referenced by L1GlobalTrigger::produce(), and unpack().

    {
        m_boardId = boardIdValue;
    }
void L1TcsWord::setBoardId ( const boost::uint64_t &  word64)

set the BoardId value from a 64-bits word

Definition at line 150 of file L1TcsWord.cc.

References BoardIdMask, BoardIdShift, and m_boardId.

{
    m_boardId = (word64 & BoardIdMask) >> BoardIdShift;

}
void L1TcsWord::setBoardIdWord64 ( boost::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 158 of file L1TcsWord.cc.

References BoardIdShift, BoardIdWord, and m_boardId.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

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

}
void L1TcsWord::setBxNr ( const boost::uint16_t  bxNrValue) [inline]

Definition at line 94 of file L1TcsWord.h.

References m_bxNr.

Referenced by L1GlobalTrigger::produce(), and unpack().

    {
        m_bxNr = bxNrValue;
    }
void L1TcsWord::setBxNr ( const boost::uint64_t &  word64)

set the BxNr value from a 64-bits word

Definition at line 169 of file L1TcsWord.cc.

References BxNrMask, BxNrShift, and m_bxNr.

{

    m_bxNr = (word64 & BxNrMask) >> BxNrShift;

}
void L1TcsWord::setBxNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 178 of file L1TcsWord.cc.

References BxNrShift, BxNrWord, and m_bxNr.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

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

}
void L1TcsWord::setDaqNr ( const boost::uint64_t &  word64)

set the DaqNr value from a 64-bits word

Definition at line 190 of file L1TcsWord.cc.

References DaqNrMask, DaqNrShift, and m_daqNr.

{

    m_daqNr = (word64 & DaqNrMask) >> DaqNrShift;

}
void L1TcsWord::setDaqNr ( const boost::uint16_t  daqNrValue) [inline]

Definition at line 114 of file L1TcsWord.h.

References m_daqNr.

Referenced by unpack().

    {
        m_daqNr = daqNrValue;
    }
void L1TcsWord::setDaqNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 199 of file L1TcsWord.cc.

References DaqNrShift, DaqNrWord, and m_daqNr.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == DaqNrWord) {
        word64 = word64 | (static_cast<boost::uint64_t> (m_daqNr) << DaqNrShift);
    }

}
void L1TcsWord::setEventNr ( const boost::uint32_t  eventNrValue) [inline]

Definition at line 253 of file L1TcsWord.h.

References m_eventNr.

Referenced by L1GlobalTrigger::produce(), and unpack().

    {
        m_eventNr = eventNrValue;
    }
void L1TcsWord::setEventNr ( const boost::uint64_t &  word64)

set the EventNr value from a 64-bits word

Definition at line 343 of file L1TcsWord.cc.

References EventNrMask, EventNrShift, and m_eventNr.

{

    m_eventNr = (word64 & EventNrMask) >> EventNrShift;

}
void L1TcsWord::setEventNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 352 of file L1TcsWord.cc.

References EventNrShift, EventNrWord, and m_eventNr.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

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

}
void L1TcsWord::setLuminositySegmentNr ( const boost::uint16_t  luminositySegmentNrValue) [inline]

Definition at line 173 of file L1TcsWord.h.

References m_luminositySegmentNr.

Referenced by L1GlobalTriggerEvmRawToDigi::produce(), L1GlobalTrigger::produce(), and unpack().

    {
        m_luminositySegmentNr = luminositySegmentNrValue;
    }
void L1TcsWord::setLuminositySegmentNr ( const boost::uint64_t &  word64)

set the luminosity segment number value from a 64-bits word

Definition at line 252 of file L1TcsWord.cc.

References LuminositySegmentNrMask, LuminositySegmentNrShift, and m_luminositySegmentNr.

void L1TcsWord::setLuminositySegmentNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

set the luminosity segment number value in a 64-bits word, having the index iWord in the GTFE EVM raw record

Definition at line 262 of file L1TcsWord.cc.

References LuminositySegmentNrShift, LuminositySegmentNrWord, and m_luminositySegmentNr.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == LuminositySegmentNrWord) {
        word64 = word64 |
                 (static_cast<boost::uint64_t> (m_luminositySegmentNr) << LuminositySegmentNrShift);
    }

}
void L1TcsWord::setOrbitNr ( const boost::uint64_t  orbitNrValue) [inline]

Definition at line 273 of file L1TcsWord.h.

References m_orbitNr.

Referenced by L1GlobalTrigger::produce().

    {
        m_orbitNr = orbitNrValue;
    }
void L1TcsWord::setOrbitNrFrom ( const boost::uint64_t &  word64)

set the OrbitNr value from a 64-bits word

Definition at line 365 of file L1TcsWord.cc.

References m_orbitNr, OrbitNrMask, and OrbitNrShift.

Referenced by unpack().

{

    m_orbitNr = (word64 & OrbitNrMask) >> OrbitNrShift;

}
void L1TcsWord::setOrbitNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 374 of file L1TcsWord.cc.

References m_orbitNr, OrbitNrShift, and OrbitNrWord.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == OrbitNrWord) {
        word64 = word64 | (static_cast<boost::uint64_t> (m_orbitNr) << OrbitNrShift);
    }

}
void L1TcsWord::setPartRunNr ( const boost::uint64_t &  word64)

set the PartRunNr value from a 64-bits word

Definition at line 275 of file L1TcsWord.cc.

References m_partRunNr, PartRunNrMask, and PartRunNrShift.

void L1TcsWord::setPartRunNr ( const boost::uint32_t  partRunNrValue) [inline]

Definition at line 193 of file L1TcsWord.h.

References m_partRunNr.

Referenced by unpack().

    {
        m_partRunNr = partRunNrValue;
    }
void L1TcsWord::setPartRunNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 284 of file L1TcsWord.cc.

References m_partRunNr, PartRunNrShift, and PartRunNrWord.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == PartRunNrWord) {
        word64 = word64 |
                 (static_cast<boost::uint64_t> (m_partRunNr) << PartRunNrShift);
    }

}
void L1TcsWord::setPartTrigNr ( const boost::uint64_t &  word64)

set the PartTrigNr value from a 64-bits word

Definition at line 321 of file L1TcsWord.cc.

References m_partTrigNr, PartTrigNrMask, and PartTrigNrShift.

void L1TcsWord::setPartTrigNr ( const boost::uint32_t  partTrigNrValue) [inline]

Definition at line 233 of file L1TcsWord.h.

References m_partTrigNr.

Referenced by unpack().

    {
        m_partTrigNr = partTrigNrValue;
    }
void L1TcsWord::setPartTrigNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 330 of file L1TcsWord.cc.

References m_partTrigNr, PartTrigNrShift, and PartTrigNrWord.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == PartTrigNrWord) {
        word64 = word64 |
                 (static_cast<boost::uint64_t> (m_partTrigNr) << PartTrigNrShift);
    }

}
void L1TcsWord::setStatus ( const boost::uint64_t &  word64)

set the Status value from a 64-bits word

Definition at line 231 of file L1TcsWord.cc.

References m_status, StatusMask, and StatusShift.

{

    m_status = (word64 & StatusMask) >> StatusShift;

}
void L1TcsWord::setStatus ( const boost::uint16_t  statusValue) [inline]

Definition at line 154 of file L1TcsWord.h.

References m_status.

Referenced by unpack().

    {
        m_status = statusValue;
    }
void L1TcsWord::setStatusWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 240 of file L1TcsWord.cc.

References m_status, StatusShift, and StatusWord.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == StatusWord) {
        word64 = word64 | (static_cast<boost::uint64_t> (m_status) << StatusShift);
    }

}
void L1TcsWord::setTriggerType ( const boost::uint64_t &  word64)

set the TriggerType value from a 64-bits word

Definition at line 210 of file L1TcsWord.cc.

References m_triggerType, TriggerTypeMask, and TriggerTypeShift.

void L1TcsWord::setTriggerType ( const boost::uint16_t  triggerTypeValue) [inline]

Definition at line 134 of file L1TcsWord.h.

References m_triggerType.

Referenced by L1GlobalTrigger::produce(), and unpack().

    {
        m_triggerType = triggerTypeValue;
    }
void L1TcsWord::setTriggerTypeWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 219 of file L1TcsWord.cc.

References m_triggerType, TriggerTypeShift, and TriggerTypeWord.

Referenced by L1GTEvmDigiToRaw::packTCS().

{

    if (iWord == TriggerTypeWord) {
        word64 = word64 |
                 (static_cast<boost::uint64_t> (m_triggerType) << TriggerTypeShift);
    }

}
const boost::uint16_t L1TcsWord::status ( ) const [inline]

get/set status: 0000 = normal rate; 1000 = low rate = warning

Definition at line 149 of file L1TcsWord.h.

References m_status.

    {
        return m_status;
    }
const boost::uint16_t L1TcsWord::triggerType ( ) const [inline]

get/set trigger type, identical with event type in CMS header

Definition at line 129 of file L1TcsWord.h.

References m_triggerType.

Referenced by L1TGT::analyze().

    {
        return m_triggerType;
    }
void L1TcsWord::unpack ( const unsigned char *  tcsPtr)

unpack TCS tcsPtr pointer to the beginning of the TCS block in the raw data

Definition at line 502 of file L1TcsWord.cc.

References AssignedPartitionsWord, BlockSize, BoardIdWord, BxNrWord, DaqNrWord, EventNrWord, edm::isDebugEnabled(), LogDebug, LogTrace, LuminositySegmentNrWord, OrbitNrWord, PartRunNrWord, PartTrigNrWord, setAssignedPartitions(), setBoardId(), setBxNr(), setDaqNr(), setEventNr(), setLuminositySegmentNr(), setOrbitNrFrom(), setPartRunNr(), setPartTrigNr(), setStatus(), setTriggerType(), StatusWord, and TriggerTypeWord.

Referenced by L1GlobalTriggerEvmRawToDigi::produce().

{
    LogDebug("L1GtTcsWord")
    << "\nUnpacking TCS block.\n"
    << std::endl;

    const boost::uint64_t* payload =
        reinterpret_cast<boost::uint64_t*>(const_cast<unsigned char*>(tcsPtr));

    setBoardId(payload[BoardIdWord]);
    setBxNr(payload[BxNrWord]);
    setDaqNr(payload[DaqNrWord]);
    setTriggerType(payload[TriggerTypeWord]);
    setStatus(payload[StatusWord]);
    setLuminositySegmentNr(payload[LuminositySegmentNrWord]);

    setPartRunNr(payload[PartRunNrWord]);
    setAssignedPartitions(payload[AssignedPartitionsWord]);

    setPartTrigNr(payload[PartTrigNrWord]);
    setEventNr(payload[EventNrWord]);

    setOrbitNrFrom(payload[OrbitNrWord]);

    if ( edm::isDebugEnabled() ) {

        for (int iWord = 0; iWord < BlockSize; ++iWord) {
            LogTrace("L1GtTcsWord")
            << std::setw(4) << iWord << "  "
            << std::hex << std::setfill('0')
            << std::setw(16) << payload[iWord]
            << std::dec << std::setfill(' ')
            << std::endl;
        }

    }

}

Member Data Documentation

const boost::uint64_t L1TcsWord::AssignedPartitionsMask = 0x00000000FFFFFFFFULL [static, private]

Definition at line 347 of file L1TcsWord.h.

Referenced by setAssignedPartitions().

const int L1TcsWord::AssignedPartitionsShift = 0 [static, private]

Definition at line 350 of file L1TcsWord.h.

Referenced by setAssignedPartitions(), and setAssignedPartitionsWord64().

const int L1TcsWord::AssignedPartitionsWord = 1 [static, private]

Definition at line 344 of file L1TcsWord.h.

Referenced by setAssignedPartitionsWord64(), and unpack().

const int L1TcsWord::BlockSize = 5 [static, private]

Definition at line 313 of file L1TcsWord.h.

Referenced by getSize(), and unpack().

const boost::uint64_t L1TcsWord::BoardIdMask = 0xFFFF000000000000ULL [static, private]

Definition at line 326 of file L1TcsWord.h.

Referenced by setBoardId().

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

Definition at line 334 of file L1TcsWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

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

Definition at line 318 of file L1TcsWord.h.

Referenced by setBoardIdWord64(), and unpack().

const boost::uint64_t L1TcsWord::BxNrMask = 0x00000FFF00000000ULL [static, private]

Definition at line 327 of file L1TcsWord.h.

Referenced by setBxNr().

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

Definition at line 335 of file L1TcsWord.h.

Referenced by setBxNr(), and setBxNrWord64().

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

Definition at line 319 of file L1TcsWord.h.

Referenced by setBxNrWord64(), and unpack().

const boost::uint64_t L1TcsWord::DaqNrMask = 0x000000000F000000ULL [static, private]

Definition at line 328 of file L1TcsWord.h.

Referenced by setDaqNr().

const int L1TcsWord::DaqNrShift = 24 [static, private]

Definition at line 336 of file L1TcsWord.h.

Referenced by setDaqNr(), and setDaqNrWord64().

const int L1TcsWord::DaqNrWord = 0 [static, private]

Definition at line 320 of file L1TcsWord.h.

Referenced by setDaqNrWord64(), and unpack().

const boost::uint64_t L1TcsWord::EventNrMask = 0x00000000FFFFFFFFULL [static, private]

Definition at line 358 of file L1TcsWord.h.

Referenced by setEventNr().

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

Definition at line 361 of file L1TcsWord.h.

Referenced by setEventNr(), and setEventNrWord64().

const int L1TcsWord::EventNrWord = 2 [static, private]

Definition at line 355 of file L1TcsWord.h.

Referenced by setEventNrWord64(), and unpack().

const boost::uint64_t L1TcsWord::LuminositySegmentNrMask = 0x000000000000FFFFULL [static, private]

Definition at line 331 of file L1TcsWord.h.

Referenced by setLuminositySegmentNr().

const int L1TcsWord::LuminositySegmentNrShift = 0 [static, private]

Definition at line 339 of file L1TcsWord.h.

Referenced by setLuminositySegmentNr(), and setLuminositySegmentNrWord64().

const int L1TcsWord::LuminositySegmentNrWord = 0 [static, private]

Definition at line 323 of file L1TcsWord.h.

Referenced by setLuminositySegmentNrWord64(), and unpack().

boost::uint32_t L1TcsWord::m_assignedPartitions [private]

bit "i" correspond to detector partition "i" if bit = 1, detection partition connected to actual DAQ partition

Definition at line 406 of file L1TcsWord.h.

Referenced by assignedPartitions(), L1TcsWord(), operator==(), print(), reset(), setAssignedPartitions(), and setAssignedPartitionsWord64().

boost::uint16_t L1TcsWord::m_boardId [private]

board identifier

Definition at line 381 of file L1TcsWord.h.

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

boost::uint16_t L1TcsWord::m_bxNr [private]

bunch cross number as counted in the TCS chip

Definition at line 384 of file L1TcsWord.h.

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

boost::uint16_t L1TcsWord::m_daqNr [private]

number of DAQ partition to which the L1A has been sent

Definition at line 387 of file L1TcsWord.h.

Referenced by daqNr(), L1TcsWord(), operator==(), print(), reset(), setDaqNr(), and setDaqNrWord64().

boost::uint32_t L1TcsWord::m_eventNr [private]

event number since last L1 reset generated in TCS chip

Definition at line 415 of file L1TcsWord.h.

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

boost::uint16_t L1TcsWord::m_luminositySegmentNr [private]

luminosity segment number

Definition at line 396 of file L1TcsWord.h.

Referenced by L1TcsWord(), luminositySegmentNr(), operator==(), print(), reset(), setLuminositySegmentNr(), and setLuminositySegmentNrWord64().

boost::uint64_t L1TcsWord::m_orbitNr [private]

orbit number since start of run (48 bits, in fact)

Definition at line 420 of file L1TcsWord.h.

Referenced by L1TcsWord(), operator==(), orbitNr(), print(), reset(), setOrbitNr(), setOrbitNrFrom(), and setOrbitNrWord64().

boost::uint32_t L1TcsWord::m_partRunNr [private]

partition run number

Definition at line 401 of file L1TcsWord.h.

Referenced by L1TcsWord(), operator==(), partRunNr(), print(), reset(), setPartRunNr(), and setPartRunNrWord64().

boost::uint32_t L1TcsWord::m_partTrigNr [private]

total number of L1A sent since start of the run to this DAQ partition

Definition at line 412 of file L1TcsWord.h.

Referenced by L1TcsWord(), operator==(), partTrigNr(), print(), reset(), setPartTrigNr(), and setPartTrigNrWord64().

boost::uint16_t L1TcsWord::m_status [private]

0000 = normal rate; 1000 = low rate = warning

Definition at line 393 of file L1TcsWord.h.

Referenced by L1TcsWord(), operator==(), print(), reset(), setStatus(), setStatusWord64(), and status().

boost::uint16_t L1TcsWord::m_triggerType [private]

trigger type, identical with event type in CMS header (event type)

Definition at line 390 of file L1TcsWord.h.

Referenced by L1TcsWord(), operator==(), print(), reset(), setTriggerType(), setTriggerTypeWord64(), and triggerType().

const boost::uint64_t L1TcsWord::OrbitNrMask = 0x0000FFFFFFFFFFFFULL [static, private]

Definition at line 367 of file L1TcsWord.h.

Referenced by setOrbitNrFrom().

const int L1TcsWord::OrbitNrShift = 0 [static, private]

Definition at line 369 of file L1TcsWord.h.

Referenced by setOrbitNrFrom(), and setOrbitNrWord64().

const int L1TcsWord::OrbitNrWord = 3 [static, private]

Definition at line 365 of file L1TcsWord.h.

Referenced by setOrbitNrWord64(), and unpack().

const boost::uint64_t L1TcsWord::PartRunNrMask = 0xFFFFFFFF00000000ULL [static, private]

Definition at line 346 of file L1TcsWord.h.

Referenced by setPartRunNr().

const int L1TcsWord::PartRunNrShift = 32 [static, private]

Definition at line 349 of file L1TcsWord.h.

Referenced by setPartRunNr(), and setPartRunNrWord64().

const int L1TcsWord::PartRunNrWord = 1 [static, private]

Definition at line 343 of file L1TcsWord.h.

Referenced by setPartRunNrWord64(), and unpack().

const boost::uint64_t L1TcsWord::PartTrigNrMask = 0xFFFFFFFF00000000ULL [static, private]

Definition at line 357 of file L1TcsWord.h.

Referenced by setPartTrigNr().

const int L1TcsWord::PartTrigNrShift = 32 [static, private]

Definition at line 360 of file L1TcsWord.h.

Referenced by setPartTrigNr(), and setPartTrigNrWord64().

const int L1TcsWord::PartTrigNrWord = 2 [static, private]

Definition at line 354 of file L1TcsWord.h.

Referenced by setPartTrigNrWord64(), and unpack().

const boost::uint64_t L1TcsWord::StatusMask = 0x00000000000F0000ULL [static, private]

Definition at line 330 of file L1TcsWord.h.

Referenced by setStatus().

const int L1TcsWord::StatusShift = 16 [static, private]

Definition at line 338 of file L1TcsWord.h.

Referenced by setStatus(), and setStatusWord64().

const int L1TcsWord::StatusWord = 0 [static, private]

Definition at line 322 of file L1TcsWord.h.

Referenced by setStatusWord64(), and unpack().

const boost::uint64_t L1TcsWord::TriggerTypeMask = 0x0000000000F00000ULL [static, private]

Definition at line 329 of file L1TcsWord.h.

Referenced by setTriggerType().

const int L1TcsWord::TriggerTypeShift = 20 [static, private]

Definition at line 337 of file L1TcsWord.h.

Referenced by setTriggerType(), and setTriggerTypeWord64().

const int L1TcsWord::TriggerTypeWord = 0 [static, private]

Definition at line 321 of file L1TcsWord.h.

Referenced by setTriggerTypeWord64(), and unpack().