#include <L1GtfeExtWord.h>
Public Member Functions | |
const cms_uint16_t | beamMode () const |
const cms_uint16_t | beamMomentum () const |
const cms_uint16_t | bst (int iB) const |
get/set BST block for index iB | |
const std::vector< cms_uint16_t > & | bst () const |
get the full BST block | |
const unsigned int | bstLengthBytes () const |
get the size of the BST block | |
const cms_uint16_t | bstMasterStatus () const |
const cms_uint16_t | bstSource () const |
get/set hex message indicating the source of BST message | |
const unsigned int | getSize () const |
get the size of the GTFE block in GT EVM record (in multiple of 8 bits) | |
const cms_uint64_t | gpsTime () const |
LHC-BOB-ES-0001 (EDMS 638899) | |
L1GtfeExtWord (cms_uint16_t boardIdValue, cms_uint16_t recordLengthValue, cms_uint16_t recordLength1Value, cms_uint16_t bxNrValue, cms_uint32_t setupVersionValue, cms_uint16_t activeBoardsValue, cms_uint16_t altNrBxBoardValue, cms_uint32_t totalTriggerNrValue, std::vector< cms_uint16_t > bstValue, cms_uint16_t bstSourceValue) | |
constructor from unpacked values, m_bst size taken from bstValue | |
L1GtfeExtWord (int bstSizeBytes) | |
all members set to zero, m_bst has bstSizeBytes zero elements | |
L1GtfeExtWord () | |
constructors | |
const cms_uint32_t | lhcFillNumber () const |
bool | operator!= (const L1GtfeExtWord &) const |
unequal operator | |
bool | operator== (const L1GtfeExtWord &) const |
equal operator | |
const cms_uint16_t | particleTypeBeam1 () const |
const cms_uint16_t | particleTypeBeam2 () const |
virtual void | print (std::ostream &myCout) const |
pretty print the content of a L1GtfeExtWord | |
void | reset () |
reset the content of a L1GtfeExtWord | |
void | resize (int bstSizeBytes) |
resize the BST vector to get the right size of the block | |
void | setBst (const cms_uint16_t bstVal, const int iB) |
void | setBst (const cms_uint64_t &word64, const int iB) |
set the BST block for index iB from a 64-bits word | |
void | setBstSource (const cms_uint16_t bstSourceVal) |
void | setBstSource (const cms_uint64_t &word64) |
set the hex message indicating the source of BST message from a 64-bits word | |
void | setBstSourceWord64 (cms_uint64_t &word64, const int iWord) |
void | setBstWord64 (cms_uint64_t &word64, int iB, const int iWord) |
void | setGpsTime (const cms_uint64_t) |
const cms_uint32_t | totalIntensityBeam1 () const |
const cms_uint32_t | totalIntensityBeam2 () const |
const cms_uint32_t | turnCountNumber () const |
virtual void | unpack (const unsigned char *gtfePtr) |
virtual | ~L1GtfeExtWord () |
destructor | |
Private Attributes | |
std::vector< cms_uint16_t > | m_bst |
BST message - each byte is an vector element. | |
cms_uint16_t | m_bstSource |
hex message indicating the source of BST message (beam or simulated) | |
Static Private Attributes | |
static const int | BeamModeFirstBlock = 26 |
static const int | BeamModeLastBlock = 27 |
static const int | BeamMomentumFirstBlock = 30 |
static const int | BeamMomentumLastBlock = 31 |
static const int | BstBitSize = 8 |
size in bits for a BST block | |
static const cms_uint64_t | BstBlockMask = 0xFFULL |
static const int | BstFirstWord = 2 |
block description in the raw GT record | |
static const int | BstMasterStatusFirstBlock = 17 |
static const int | BstMasterStatusLastBlock = 17 |
static const cms_uint64_t | BstSourceMask = 0xFFFF000000000000ULL |
static const int | BstSourceShift = 48 |
static const int | GpsTimeFirstBlock = 0 |
BST blocks: conversion to defined quantities (LHC-BOB-ES-0001) | |
static const int | GpsTimeLastBlock = 7 |
static const int | LhcFillNumberFirstBlock = 22 |
static const int | LhcFillNumberLastBlock = 25 |
static const int | ParticleTypeBeam1FirstBlock = 28 |
static const int | ParticleTypeBeam1LastBlock = 28 |
static const int | ParticleTypeBeam2FirstBlock = 29 |
static const int | ParticleTypeBeam2LastBlock = 29 |
static const int | TotalIntensityBeam1FirstBlock = 32 |
static const int | TotalIntensityBeam1LastBlock = 35 |
static const int | TotalIntensityBeam2FirstBlock = 36 |
static const int | TotalIntensityBeam2LastBlock = 39 |
static const int | TurnCountNumberFirstBlock = 18 |
static const int | TurnCountNumberLastBlock = 21 |
Description: L1 Global Trigger - extended GTFE block in the readout record.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Description: L1 Global Trigger - GTFE words in the readout record.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 33 of file L1GtfeExtWord.h.
L1GtfeExtWord::L1GtfeExtWord | ( | ) |
constructors
Definition at line 37 of file L1GtfeExtWord.cc.
: L1GtfeWord(), m_bstSource(0) { // empty }
L1GtfeExtWord::L1GtfeExtWord | ( | int | bstSizeBytes | ) |
all members set to zero, m_bst has bstSizeBytes zero elements
Definition at line 45 of file L1GtfeExtWord.cc.
References m_bst.
: L1GtfeWord(), m_bstSource(0) { m_bst.resize(bstSizeBytes); }
L1GtfeExtWord::L1GtfeExtWord | ( | cms_uint16_t | boardIdValue, |
cms_uint16_t | recordLengthValue, | ||
cms_uint16_t | recordLength1Value, | ||
cms_uint16_t | bxNrValue, | ||
cms_uint32_t | setupVersionValue, | ||
cms_uint16_t | activeBoardsValue, | ||
cms_uint16_t | altNrBxBoardValue, | ||
cms_uint32_t | totalTriggerNrValue, | ||
std::vector< cms_uint16_t > | bstValue, | ||
cms_uint16_t | bstSourceValue | ||
) |
constructor from unpacked values, m_bst size taken from bstValue
Definition at line 54 of file L1GtfeExtWord.cc.
: L1GtfeWord( boardIdValue, recordLength1Value, recordLengthValue, bxNrValue, setupVersionValue, activeBoardsValue, altNrBxBoardValue, totalTriggerNrValue), m_bst(bstValue), m_bstSource(bstSourceValue) { // empty }
L1GtfeExtWord::~L1GtfeExtWord | ( | ) | [virtual] |
const cms_uint16_t L1GtfeExtWord::beamMode | ( | ) | const |
Definition at line 254 of file L1GtfeExtWord.cc.
References BeamModeFirstBlock, BeamModeLastBlock, BstBitSize, and m_bst.
Referenced by L1TSync::analyze(), L1TGT::analyze(), HcalDeadCellMonitor::analyze(), DQMProvInfo::makeGtInfo(), and ConditionDumperInEdm::produce().
{ cms_uint16_t bm = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (BeamModeLastBlock >= bstSize) { return bm; } for (int iB = BeamModeFirstBlock; iB <= BeamModeLastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - BeamModeFirstBlock; const int BstShift = BstBitSize*scaledIB; bm = bm | ( m_bst[iB] << BstShift ); } return bm; }
const cms_uint16_t L1GtfeExtWord::beamMomentum | ( | ) | const |
Definition at line 327 of file L1GtfeExtWord.cc.
References BeamMomentumFirstBlock, BeamMomentumLastBlock, BstBitSize, and m_bst.
Referenced by L1TGT::analyze(), DQMProvInfo::makeGtInfo(), and ConditionDumperInEdm::produce().
{ cms_uint16_t bm = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (BeamMomentumLastBlock >= bstSize) { return bm; } for (int iB = BeamMomentumFirstBlock; iB <= BeamMomentumLastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - BeamMomentumFirstBlock; const int BstShift = BstBitSize*scaledIB; bm = bm | ( m_bst[iB] << BstShift ); } return bm; }
const std::vector<cms_uint16_t>& L1GtfeExtWord::bst | ( | ) | const [inline] |
get the full BST block
Definition at line 71 of file L1GtfeExtWord.h.
References m_bst.
{ return m_bst; }
const uint16_t L1GtfeExtWord::bst | ( | int | iB | ) | const |
get/set BST block for index iB
Definition at line 403 of file L1GtfeExtWord.cc.
References Exception, and m_bst.
{ int NumberBstBlocks = m_bst.size(); if (iB < 0 || iB >= NumberBstBlocks) { throw cms::Exception("BstIndexError") << "\nError: index for BST array out of range. Allowed range: [0, " << NumberBstBlocks << ") " << std::endl; } else { return m_bst[iB]; } }
const unsigned int L1GtfeExtWord::bstLengthBytes | ( | ) | const [inline] |
get the size of the BST block
Definition at line 76 of file L1GtfeExtWord.h.
References m_bst.
Referenced by L1GTEvmDigiToRaw::produce().
{ return m_bst.size(); }
const cms_uint16_t L1GtfeExtWord::bstMasterStatus | ( | ) | const |
Definition at line 179 of file L1GtfeExtWord.cc.
References BstBitSize, BstMasterStatusFirstBlock, BstMasterStatusLastBlock, and m_bst.
Referenced by L1TGT::analyze(), and ConditionDumperInEdm::produce().
{ cms_uint16_t bms = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (BstMasterStatusLastBlock >= bstSize) { return bms; } for (int iB = BstMasterStatusFirstBlock; iB <= BstMasterStatusLastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - BstMasterStatusFirstBlock; const int BstShift = BstBitSize*scaledIB; bms = bms | ( m_bst[iB] << BstShift ); } return bms; }
const cms_uint16_t L1GtfeExtWord::bstSource | ( | ) | const [inline] |
get/set hex message indicating the source of BST message
Definition at line 114 of file L1GtfeExtWord.h.
References m_bstSource.
{ return m_bstSource; }
const unsigned int L1GtfeExtWord::getSize | ( | ) | const |
get the size of the GTFE block in GT EVM record (in multiple of 8 bits)
Reimplemented from L1GtfeWord.
Definition at line 492 of file L1GtfeExtWord.cc.
References L1GtfeWord::getSize(), and m_bst.
Referenced by L1GTEvmDigiToRaw::packGTFE(), L1GTEvmDigiToRaw::produce(), L1GlobalTriggerEvmRawToDigi::produce(), setBstSourceWord64(), and unpack().
{ L1GtfeWord gtfeWord; unsigned int gtfeSize = gtfeWord.getSize(); unsigned int gtfeExtSize; // 2 bytes to write if real BST message or simulated BST message unsigned int bytesBstWriter = 2; // size of BST block, using rounded 64-bit words (8 bytes per 64-bit word) unsigned int bstSize = m_bst.size(); if ( (bstSize +bytesBstWriter )%8 == 0) { gtfeExtSize = gtfeSize + bstSize + bytesBstWriter; } else { gtfeExtSize = gtfeSize + bstSize + bytesBstWriter + (8 - (bstSize + bytesBstWriter)%8 ); } return gtfeExtSize; }
const cms_uint64_t L1GtfeExtWord::gpsTime | ( | ) | const |
LHC-BOB-ES-0001 (EDMS 638899)
Definition at line 118 of file L1GtfeExtWord.cc.
References BstBitSize, GpsTimeFirstBlock, GpsTimeLastBlock, and m_bst.
Referenced by L1TGT::analyze().
{ cms_uint64_t gpst = 0ULL; // return 0 if BST message too small int bstSize = m_bst.size(); if (GpsTimeLastBlock >= bstSize) { return gpst; } for (int iB = GpsTimeFirstBlock; iB <= GpsTimeLastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - GpsTimeFirstBlock; const int BstShift = BstBitSize*scaledIB; gpst = gpst | ( (static_cast<cms_uint64_t> (m_bst[iB])) << BstShift ); } return gpst; }
const cms_uint32_t L1GtfeExtWord::lhcFillNumber | ( | ) | const |
Definition at line 229 of file L1GtfeExtWord.cc.
References BstBitSize, LhcFillNumberFirstBlock, LhcFillNumberLastBlock, and m_bst.
Referenced by L1TGT::analyze(), L1TSync::analyze(), DQMProvInfo::makeGtInfo(), and ConditionDumperInEdm::produce().
{ cms_uint32_t lhcfn = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (LhcFillNumberLastBlock >= bstSize) { return lhcfn; } for (int iB = LhcFillNumberFirstBlock; iB <= LhcFillNumberLastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - LhcFillNumberFirstBlock; const int BstShift = BstBitSize*scaledIB; lhcfn = lhcfn | ( (static_cast<cms_uint32_t> (m_bst[iB])) << BstShift ); } return lhcfn; }
bool L1GtfeExtWord::operator!= | ( | const L1GtfeExtWord & | result | ) | const |
bool L1GtfeExtWord::operator== | ( | const L1GtfeExtWord & | result | ) | const |
equal operator
Definition at line 78 of file L1GtfeExtWord.cc.
References m_bst, m_bstSource, and query::result.
{ // base class const L1GtfeWord gtfeResult = result; const L1GtfeWord gtfeThis = *this; if (gtfeThis != gtfeResult) { return false; } // for (unsigned int iB = 0; iB < m_bst.size(); ++iB) { if(m_bst[iB] != result.m_bst[iB]) { return false; } } if ( m_bstSource != result.m_bstSource) { return false; } // all members identical return true; }
const cms_uint16_t L1GtfeExtWord::particleTypeBeam1 | ( | ) | const |
Definition at line 278 of file L1GtfeExtWord.cc.
References BstBitSize, m_bst, ParticleTypeBeam1FirstBlock, and ParticleTypeBeam1LastBlock.
{ cms_uint16_t ptb = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (ParticleTypeBeam1LastBlock >= bstSize) { return ptb; } for (int iB = ParticleTypeBeam1FirstBlock; iB <= ParticleTypeBeam1LastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - ParticleTypeBeam1FirstBlock; const int BstShift = BstBitSize*scaledIB; ptb = ptb | ( m_bst[iB] << BstShift ); } return ptb; }
const cms_uint16_t L1GtfeExtWord::particleTypeBeam2 | ( | ) | const |
Definition at line 302 of file L1GtfeExtWord.cc.
References BstBitSize, m_bst, ParticleTypeBeam2FirstBlock, and ParticleTypeBeam2LastBlock.
{ cms_uint16_t ptb = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (ParticleTypeBeam2LastBlock >= bstSize) { return ptb; } for (int iB = ParticleTypeBeam2FirstBlock; iB <= ParticleTypeBeam2LastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - ParticleTypeBeam2FirstBlock; const int BstShift = BstBitSize*scaledIB; ptb = ptb | ( m_bst[iB] << BstShift ); } return ptb; }
void L1GtfeExtWord::print | ( | std::ostream & | myCout | ) | const [virtual] |
pretty print the content of a L1GtfeExtWord
Reimplemented from L1GtfeWord.
Definition at line 535 of file L1GtfeExtWord.cc.
References m_bst, and m_bstSource.
Referenced by L1GlobalTriggerEvmReadoutRecord::print(), L1GTEvmDigiToRaw::produce(), and L1GlobalTriggerEvmRawToDigi::produce().
{ myCout << "\n L1GtfeExtWord::print \n" << std::endl; unsigned int sizeW64 = 64; unsigned int dataBlocksPerLine = sizeW64 / 8; // 8x8 bits per line L1GtfeWord::print(myCout); unsigned int numberBstBlocks = m_bst.size(); myCout << "\n BST "; if (numberBstBlocks == 0) { myCout << "\n BST source [hex]: " << std::hex << std::setw(4) << std::setfill('0') << m_bstSource << std::setfill(' ') << std::dec << std::endl; return; } for (unsigned int iB = 0; iB < numberBstBlocks; iB += dataBlocksPerLine) { myCout << "\n" << std::hex << " hex: "; for (unsigned int jB = iB; jB < dataBlocksPerLine + iB; ++jB) { if (jB >= numberBstBlocks) { break; } myCout << std::setw(2) << std::setfill('0') << m_bst[jB] << " " << std::setfill(' '); } myCout << "\n" << std::dec << " dec: "; for (unsigned int jB = iB; jB < dataBlocksPerLine + iB; ++jB) { if (jB >= numberBstBlocks) { break; } myCout << std::setw(3) << std::setfill('0') << m_bst[jB] << " " << std::setfill(' '); } myCout << std::endl; } myCout << "\n BST source [hex]: " << std::hex << std::setw(4) << std::setfill('0') << m_bstSource << std::setfill(' ') << std::dec << std::endl; }
void L1GtfeExtWord::reset | ( | void | ) | [virtual] |
reset the content of a L1GtfeExtWord
Reimplemented from L1GtfeWord.
Definition at line 526 of file L1GtfeExtWord.cc.
References m_bst.
Referenced by L1GlobalTriggerEvmRawToDigi::produce().
{ L1GtfeWord::reset(); m_bst.clear(); }
void L1GtfeExtWord::resize | ( | int | bstSizeBytes | ) |
resize the BST vector to get the right size of the block
Definition at line 519 of file L1GtfeExtWord.cc.
References m_bst.
Referenced by L1GlobalTriggerEvmRawToDigi::produce().
{ m_bst.resize(bstSizeBytes); }
void L1GtfeExtWord::setBst | ( | const cms_uint16_t | bstVal, |
const int | iB | ||
) |
Referenced by unpack().
void L1GtfeExtWord::setBst | ( | const cms_uint64_t & | word64, |
const int | iB | ||
) |
set the BST block for index iB from a 64-bits word
Definition at line 436 of file L1GtfeExtWord.cc.
References BstBitSize, BstBlockMask, and m_bst.
{ // keep capitalization for similarity with other functions //FIXME check it again const int scaledIB = iB%(sizeof(word64)*8/BstBitSize); const int BstShift = BstBitSize*scaledIB; const cms_uint64_t BstMask = 0x0000000000000000ULL | (BstBlockMask << BstShift); m_bst[iB] = static_cast<cms_uint16_t> ((word64 & BstMask) >> BstShift); }
void L1GtfeExtWord::setBstSource | ( | const cms_uint64_t & | word64 | ) |
set the hex message indicating the source of BST message from a 64-bits word
Definition at line 468 of file L1GtfeExtWord.cc.
References BstSourceMask, BstSourceShift, and m_bstSource.
{ m_bstSource = (word64 & BstSourceMask) >> BstSourceShift; }
void L1GtfeExtWord::setBstSource | ( | const cms_uint16_t | bstSourceVal | ) | [inline] |
Definition at line 118 of file L1GtfeExtWord.h.
References m_bstSource.
Referenced by L1GlobalTrigger::produce().
{ m_bstSource = bstSourceVal; }
void L1GtfeExtWord::setBstSourceWord64 | ( | cms_uint64_t & | word64, |
const int | iWord | ||
) |
set hex message indicating the source of BST message in a 64-bits word, having the index iWord in the GTFE raw record
Definition at line 476 of file L1GtfeExtWord.cc.
References BstSourceShift, getSize(), and m_bstSource.
{ // BST always in the last word of GTFE extended - size must be correct! int gtfeSize = this->getSize(); int BstSourceWord = gtfeSize/8 - 1; // counting starts at 0 if (iWord == BstSourceWord) { word64 = word64 | (static_cast<cms_uint64_t> (m_bstSource) << BstSourceShift); } }
void L1GtfeExtWord::setBstWord64 | ( | cms_uint64_t & | word64, |
int | iB, | ||
const int | iWord | ||
) |
set the BST block in a 64-bits word, having the index iWord in the GTFE raw record
Definition at line 450 of file L1GtfeExtWord.cc.
References BstBitSize, BstFirstWord, and m_bst.
Referenced by L1GTEvmDigiToRaw::packGTFE().
{ // keep capitalization for similarity with other functions const int scaledIB = iB%(sizeof(word64)*8/BstBitSize); const int BstShift = BstBitSize*scaledIB; const int BstWord = iB/(sizeof(word64)*8/BstBitSize) + BstFirstWord; if (iWord == BstWord) { word64 = word64 | (static_cast<cms_uint64_t> (m_bst[iB]) << BstShift); } }
void L1GtfeExtWord::setGpsTime | ( | const cms_uint64_t | gpsTimeValue | ) |
Definition at line 143 of file L1GtfeExtWord.cc.
References BstBitSize, BstBlockMask, GpsTimeFirstBlock, GpsTimeLastBlock, and m_bst.
Referenced by L1GlobalTrigger::produce().
{ // return if BST message too small int bstSize = m_bst.size(); if (GpsTimeLastBlock >= bstSize) { edm::LogError("L1GtfeExtWord") << "Error: BST message length " << bstSize << " smaller than the required GpsTimeLastBlock " << GpsTimeLastBlock << "\n Cannot set GpsTime" << std::endl; return; } for (int iB = GpsTimeFirstBlock; iB <= GpsTimeLastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - GpsTimeFirstBlock; const int BstShift = BstBitSize*scaledIB; const cms_uint64_t BstMask = 0x0000000000000000ULL | (BstBlockMask << BstShift); m_bst[iB] = static_cast<cms_uint16_t> ((gpsTimeValue & BstMask) >> BstShift); //LogTrace("L1GtfeExtWord") //<< "BstShift: value [dec] = " << BstShift << "\n" //<< "BstBlockMask: value [hex] = " << std::hex << BstBlockMask << "\n" //<< "BstMask: value [hex] = "<< BstMask << std::dec //<< std::endl; //LogTrace("L1GtfeExtWord") //<< "BST block " << iB << ": value [hex] = " << std::hex << m_bst[iB] << std::dec //<< std::endl; } }
const cms_uint32_t L1GtfeExtWord::totalIntensityBeam1 | ( | ) | const |
Definition at line 351 of file L1GtfeExtWord.cc.
References BstBitSize, m_bst, TotalIntensityBeam1FirstBlock, and TotalIntensityBeam1LastBlock.
Referenced by L1TGT::analyze(), HcalDeadCellMonitor::analyze(), DQMProvInfo::makeGtInfo(), and ConditionDumperInEdm::produce().
{ cms_uint32_t tib = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (TotalIntensityBeam1LastBlock >= bstSize) { return tib; } for (int iB = TotalIntensityBeam1FirstBlock; iB <= TotalIntensityBeam1LastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - TotalIntensityBeam1FirstBlock; const int BstShift = BstBitSize*scaledIB; tib = tib | ( (static_cast<cms_uint32_t> (m_bst[iB])) << BstShift ); } return tib; }
const cms_uint32_t L1GtfeExtWord::totalIntensityBeam2 | ( | ) | const |
Definition at line 376 of file L1GtfeExtWord.cc.
References BstBitSize, m_bst, TotalIntensityBeam2FirstBlock, and TotalIntensityBeam2LastBlock.
Referenced by L1TGT::analyze(), HcalDeadCellMonitor::analyze(), DQMProvInfo::makeGtInfo(), and ConditionDumperInEdm::produce().
{ cms_uint32_t tib = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (TotalIntensityBeam2LastBlock >= bstSize) { return tib; } for (int iB = TotalIntensityBeam2FirstBlock; iB <= TotalIntensityBeam2LastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - TotalIntensityBeam2FirstBlock; const int BstShift = BstBitSize*scaledIB; tib = tib | ( (static_cast<cms_uint32_t> (m_bst[iB])) << BstShift ); } return tib; }
const cms_uint32_t L1GtfeExtWord::turnCountNumber | ( | ) | const |
Definition at line 204 of file L1GtfeExtWord.cc.
References BstBitSize, m_bst, TurnCountNumberFirstBlock, and TurnCountNumberLastBlock.
Referenced by L1TGT::analyze(), and ConditionDumperInEdm::produce().
{ cms_uint32_t tcn = 0; // return 0 if BST message too small int bstSize = m_bst.size(); if (TurnCountNumberLastBlock >= bstSize) { return tcn; } for (int iB = TurnCountNumberFirstBlock; iB <= TurnCountNumberLastBlock; ++iB) { // keep capitalization for similarity with other functions const int scaledIB = iB - TurnCountNumberFirstBlock; const int BstShift = BstBitSize*scaledIB; tcn = tcn | ( (static_cast<cms_uint32_t> (m_bst[iB])) << BstShift ); } return tcn; }
void L1GtfeExtWord::unpack | ( | const unsigned char * | gtfePtr | ) | [virtual] |
unpack GTFE gtfePtr pointer to the beginning of the GTFE block in the raw data
Reimplemented from L1GtfeWord.
Definition at line 593 of file L1GtfeExtWord.cc.
References BstBitSize, BstFirstWord, getSize(), L1GtfeWord::getSize(), edm::isDebugEnabled(), LogDebug, LogTrace, m_bst, and setBst().
Referenced by L1GlobalTriggerEvmRawToDigi::produce().
{ LogDebug("L1GtfeExtWord") << "\nUnpacking GTFE block.\n" << std::endl; L1GtfeWord::unpack(gtfePtr); // TODO make BlockSize protected & use friends instead of creating L1GtfeWord? L1GtfeWord gtfeWord; const unsigned char* gtfeExtPtr = gtfePtr + gtfeWord.getSize(); const cms_uint64_t* payload = reinterpret_cast<cms_uint64_t*>(const_cast<unsigned char*>(gtfeExtPtr)); int BlockSizeExt = this->getSize()/8; int NumberBstBlocks = m_bst.size(); if (edm::isDebugEnabled() ) { for (int iWord = BstFirstWord; iWord < BlockSizeExt; ++iWord) { int jWord = iWord - BstFirstWord; LogTrace("L1GtfeExtWord") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16) << payload[jWord] << std::dec << std::setfill(' ') << std::endl; } } int blocksPerWord = sizeof(cms_uint64_t)*8/BstBitSize; for (int iB = 0; iB < NumberBstBlocks; ++iB) { // keep capitalization for similarity with other functions int BstWord = iB/blocksPerWord; setBst(payload[BstWord], iB); } }
const int L1GtfeExtWord::BeamModeFirstBlock = 26 [static, private] |
Definition at line 177 of file L1GtfeExtWord.h.
Referenced by beamMode().
const int L1GtfeExtWord::BeamModeLastBlock = 27 [static, private] |
Definition at line 178 of file L1GtfeExtWord.h.
Referenced by beamMode().
const int L1GtfeExtWord::BeamMomentumFirstBlock = 30 [static, private] |
Definition at line 186 of file L1GtfeExtWord.h.
Referenced by beamMomentum().
const int L1GtfeExtWord::BeamMomentumLastBlock = 31 [static, private] |
Definition at line 187 of file L1GtfeExtWord.h.
Referenced by beamMomentum().
const int L1GtfeExtWord::BstBitSize = 8 [static, private] |
size in bits for a BST block
Definition at line 157 of file L1GtfeExtWord.h.
Referenced by beamMode(), beamMomentum(), bstMasterStatus(), gpsTime(), lhcFillNumber(), particleTypeBeam1(), particleTypeBeam2(), setBst(), setBstWord64(), setGpsTime(), totalIntensityBeam1(), totalIntensityBeam2(), turnCountNumber(), and unpack().
const cms_uint64_t L1GtfeExtWord::BstBlockMask = 0xFFULL [static, private] |
BST block mask, correlated with the number of bits of a block 8 bit = 0xFF
Definition at line 161 of file L1GtfeExtWord.h.
Referenced by setBst(), and setGpsTime().
const int L1GtfeExtWord::BstFirstWord = 2 [static, private] |
block description in the raw GT record
index of first word for BST blocks
Definition at line 154 of file L1GtfeExtWord.h.
Referenced by setBstWord64(), and unpack().
const int L1GtfeExtWord::BstMasterStatusFirstBlock = 17 [static, private] |
Definition at line 168 of file L1GtfeExtWord.h.
Referenced by bstMasterStatus().
const int L1GtfeExtWord::BstMasterStatusLastBlock = 17 [static, private] |
Definition at line 169 of file L1GtfeExtWord.h.
Referenced by bstMasterStatus().
const cms_uint64_t L1GtfeExtWord::BstSourceMask = 0xFFFF000000000000ULL [static, private] |
Definition at line 196 of file L1GtfeExtWord.h.
Referenced by setBstSource().
const int L1GtfeExtWord::BstSourceShift = 48 [static, private] |
Definition at line 198 of file L1GtfeExtWord.h.
Referenced by setBstSource(), and setBstSourceWord64().
const int L1GtfeExtWord::GpsTimeFirstBlock = 0 [static, private] |
BST blocks: conversion to defined quantities (LHC-BOB-ES-0001)
Definition at line 165 of file L1GtfeExtWord.h.
Referenced by gpsTime(), and setGpsTime().
const int L1GtfeExtWord::GpsTimeLastBlock = 7 [static, private] |
Definition at line 166 of file L1GtfeExtWord.h.
Referenced by gpsTime(), and setGpsTime().
const int L1GtfeExtWord::LhcFillNumberFirstBlock = 22 [static, private] |
Definition at line 174 of file L1GtfeExtWord.h.
Referenced by lhcFillNumber().
const int L1GtfeExtWord::LhcFillNumberLastBlock = 25 [static, private] |
Definition at line 175 of file L1GtfeExtWord.h.
Referenced by lhcFillNumber().
std::vector<cms_uint16_t> L1GtfeExtWord::m_bst [private] |
BST message - each byte is an vector element.
Definition at line 205 of file L1GtfeExtWord.h.
Referenced by beamMode(), beamMomentum(), bst(), bstLengthBytes(), bstMasterStatus(), getSize(), gpsTime(), L1GtfeExtWord(), lhcFillNumber(), operator==(), particleTypeBeam1(), particleTypeBeam2(), print(), reset(), resize(), setBst(), setBstWord64(), setGpsTime(), totalIntensityBeam1(), totalIntensityBeam2(), turnCountNumber(), and unpack().
cms_uint16_t L1GtfeExtWord::m_bstSource [private] |
hex message indicating the source of BST message (beam or simulated)
Definition at line 208 of file L1GtfeExtWord.h.
Referenced by bstSource(), operator==(), print(), setBstSource(), and setBstSourceWord64().
const int L1GtfeExtWord::ParticleTypeBeam1FirstBlock = 28 [static, private] |
Definition at line 180 of file L1GtfeExtWord.h.
Referenced by particleTypeBeam1().
const int L1GtfeExtWord::ParticleTypeBeam1LastBlock = 28 [static, private] |
Definition at line 181 of file L1GtfeExtWord.h.
Referenced by particleTypeBeam1().
const int L1GtfeExtWord::ParticleTypeBeam2FirstBlock = 29 [static, private] |
Definition at line 183 of file L1GtfeExtWord.h.
Referenced by particleTypeBeam2().
const int L1GtfeExtWord::ParticleTypeBeam2LastBlock = 29 [static, private] |
Definition at line 184 of file L1GtfeExtWord.h.
Referenced by particleTypeBeam2().
const int L1GtfeExtWord::TotalIntensityBeam1FirstBlock = 32 [static, private] |
Definition at line 189 of file L1GtfeExtWord.h.
Referenced by totalIntensityBeam1().
const int L1GtfeExtWord::TotalIntensityBeam1LastBlock = 35 [static, private] |
Definition at line 190 of file L1GtfeExtWord.h.
Referenced by totalIntensityBeam1().
const int L1GtfeExtWord::TotalIntensityBeam2FirstBlock = 36 [static, private] |
Definition at line 192 of file L1GtfeExtWord.h.
Referenced by totalIntensityBeam2().
const int L1GtfeExtWord::TotalIntensityBeam2LastBlock = 39 [static, private] |
Definition at line 193 of file L1GtfeExtWord.h.
Referenced by totalIntensityBeam2().
const int L1GtfeExtWord::TurnCountNumberFirstBlock = 18 [static, private] |
Definition at line 171 of file L1GtfeExtWord.h.
Referenced by turnCountNumber().
const int L1GtfeExtWord::TurnCountNumberLastBlock = 21 [static, private] |
Definition at line 172 of file L1GtfeExtWord.h.
Referenced by turnCountNumber().