CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
L1GtfeWord Class Reference

#include <L1GtfeWord.h>

Inheritance diagram for L1GtfeWord:
L1GtfeExtWord

Public Member Functions

const cms_uint16_t activeBoards () const
 get/set boards contributing to EVM respectively DAQ record More...
 
const cms_uint16_t altNrBxBoard () const
 get/set alternative for number of BX per board More...
 
const cms_uint16_t boardId () const
 get/set board ID More...
 
const int bstFlag () const
 get / set BST flag: 0 or 1 - via setup version (no private member) More...
 
const cms_uint16_t bxNr () const
 get/set bunch cross number as counted in the GTFE board More...
 
const unsigned int getSize () const
 get the size of the GTFE block in GT DAQ record (in multiple of 8 bits) More...
 
 L1GtfeWord ()
 constructors More...
 
 L1GtfeWord (cms_uint16_t boardIdValue, cms_uint16_t recordLength1Value, cms_uint16_t recordLengthValue, cms_uint16_t bxNrValue, cms_uint32_t setupVersionValue, cms_uint16_t activeBoardsValue, cms_uint16_t altNrBxBoardValue, cms_uint32_t totalTriggerNrValue)
 constructor from unpacked values; More...
 
bool operator!= (const L1GtfeWord &) const
 unequal operator More...
 
bool operator== (const L1GtfeWord &) const
 equal operator More...
 
virtual void print (std::ostream &myCout) const
 pretty print the content of a L1GtfeWord More...
 
const cms_uint16_t recordLength () const
 get/set record length for alternative 0 More...
 
const cms_uint16_t recordLength1 () const
 get/set record length for alternative 1 More...
 
virtual void reset ()
 reset the content of a L1GtfeWord More...
 
void setActiveBoards (cms_uint16_t activeBoardsValue)
 
void setActiveBoards (const cms_uint64_t &word64)
 
void setActiveBoardsWord64 (cms_uint64_t &word64, int iWord)
 
void setActiveBoardsWord64 (cms_uint64_t &word64, int iWord, cms_int16_t activeBoardsValue)
 
void setAltNrBxBoard (cms_uint16_t altNrBxBoardValue)
 
void setAltNrBxBoard (const cms_uint64_t &word64)
 
void setAltNrBxBoardWord64 (cms_uint64_t &word64, int iWord)
 
void setAltNrBxBoardWord64 (cms_uint64_t &word64, int iWord, cms_int16_t altNrBxBoardValue)
 
void setBoardId (cms_uint16_t boardIdValue)
 set BoardId from a BoardId value More...
 
void setBoardId (const cms_uint64_t &word64)
 set the BoardId value from a 64-bits word More...
 
void setBoardIdWord64 (cms_uint64_t &word64, int iWord)
 
void setBstFlag (const int)
 
void setBxNr (cms_uint16_t bxNrValue)
 
void setBxNr (const cms_uint64_t &word64)
 
void setBxNrWord64 (cms_uint64_t &word64, int iWord)
 
void setRecordLength (cms_uint16_t recordLengthValue)
 
void setRecordLength (const cms_uint64_t &word64)
 
void setRecordLength1 (cms_uint16_t recordLengthValue)
 
void setRecordLength1 (const cms_uint64_t &word64)
 
void setRecordLength1Word64 (cms_uint64_t &word64, int iWord)
 
void setRecordLengthWord64 (cms_uint64_t &word64, int iWord)
 
void setSetupVersion (cms_uint32_t setupVersionValue)
 
void setSetupVersion (const cms_uint64_t &word64)
 
void setSetupVersionWord64 (cms_uint64_t &word64, int iWord)
 
void setTotalTriggerNr (cms_uint32_t totalTriggerNrValue)
 
void setTotalTriggerNr (const cms_uint64_t &word64)
 
void setTotalTriggerNrWord64 (cms_uint64_t &word64, int iWord)
 
const cms_uint32_t setupVersion () const
 get/set setup version More...
 
const cms_uint32_t totalTriggerNr () const
 get/set total number of L1A sent since start of run More...
 
virtual void unpack (const unsigned char *gtfePtr)
 
virtual ~L1GtfeWord ()
 destructor More...
 

Private Attributes

cms_uint16_t m_activeBoards
 active boards contributing to EVM respectively DAQ record More...
 
cms_uint16_t m_altNrBxBoard
 
cms_uint16_t m_boardId
 board identifier More...
 
cms_uint16_t m_bxNr
 bunch cross number as counted in the GTFE board More...
 
cms_uint16_t m_recordLength
 record length for alternative 0 More...
 
cms_uint16_t m_recordLength1
 record length for alternative 1 More...
 
cms_uint32_t m_setupVersion
 
cms_uint32_t m_totalTriggerNr
 total number of L1A sent since start of run More...
 

Static Private Attributes

static const cms_uint64_t ActiveBoardsMask = 0xFFFF000000000000ULL
 
static const int ActiveBoardsShift = 48
 
static const int ActiveBoardsWord = 1
 
static const cms_uint64_t AltNrBxBoardMask = 0x0000FFFF00000000ULL
 
static const int AltNrBxBoardShift = 32
 
static const int AltNrBxBoardWord = 1
 
static const int BlockSize = 2
 
static const cms_uint64_t BoardIdMask = 0xFF00000000000000ULL
 
static const int BoardIdShift = 56
 
static const int BoardIdWord = 0
 
static const cms_uint32_t BstFlagMask = 0x0001
 
static const cms_uint64_t BxNrMask = 0x00000FFF00000000ULL
 
static const int BxNrShift = 32
 
static const int BxNrWord = 0
 
static const cms_uint64_t RecordLength1Mask = 0x00F0000000000000ULL
 
static const int RecordLength1Shift = 52
 
static const int RecordLength1Word = 0
 
static const cms_uint64_t RecordLengthMask = 0x000F000000000000ULL
 
static const int RecordLengthShift = 48
 
static const int RecordLengthWord = 0
 
static const cms_uint64_t SetupVersionMask = 0x00000000FFFFFFFFULL
 
static const int SetupVersionShift = 0
 
static const int SetupVersionWord = 0
 
static const cms_uint64_t TotalTriggerNrMask = 0x00000000FFFFFFFFULL
 
static const int TotalTriggerNrShift = 0
 
static const int TotalTriggerNrWord = 1
 

Detailed Description

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

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 30 of file L1GtfeWord.h.

Constructor & Destructor Documentation

◆ L1GtfeWord() [1/2]

L1GtfeWord::L1GtfeWord ( )

constructors

Definition at line 29 of file L1GtfeWord.cc.

30  : m_boardId(0),
31  m_recordLength1(0),
32  m_recordLength(0),
33  m_bxNr(0),
34  m_setupVersion(0),
35  m_activeBoards(0),
36  m_altNrBxBoard(0),
37  m_totalTriggerNr(0) {
38  // empty
39 }

◆ L1GtfeWord() [2/2]

L1GtfeWord::L1GtfeWord ( cms_uint16_t  boardIdValue,
cms_uint16_t  recordLength1Value,
cms_uint16_t  recordLengthValue,
cms_uint16_t  bxNrValue,
cms_uint32_t  setupVersionValue,
cms_uint16_t  activeBoardsValue,
cms_uint16_t  altNrBxBoardValue,
cms_uint32_t  totalTriggerNrValue 
)

constructor from unpacked values;

Definition at line 42 of file L1GtfeWord.cc.

50  : m_boardId(boardIdValue),
51  m_recordLength1(recordLength1Value),
52  m_recordLength(recordLengthValue),
53  m_bxNr(bxNrValue),
54  m_setupVersion(setupVersionValue),
55  m_activeBoards(activeBoardsValue),
56  m_altNrBxBoard(altNrBxBoardValue),
57  m_totalTriggerNr(totalTriggerNrValue)
58 
59 {
60  // empty
61 }

◆ ~L1GtfeWord()

L1GtfeWord::~L1GtfeWord ( )
virtual

destructor

Definition at line 64 of file L1GtfeWord.cc.

64  {
65  // empty now
66 }

Member Function Documentation

◆ activeBoards()

const cms_uint16_t L1GtfeWord::activeBoards ( ) const
inline

◆ altNrBxBoard()

const cms_uint16_t L1GtfeWord::altNrBxBoard ( ) const
inline

get/set alternative for number of BX per board

Definition at line 134 of file L1GtfeWord.h.

134 { return m_altNrBxBoard; }

References m_altNrBxBoard.

Referenced by L1GtHwValidation::compareGTFE(), L1GTEvmDigiToRaw::produce(), L1GTDigiToRaw::produce(), L1GlobalTriggerEvmRawToDigi::produce(), and L1GlobalTriggerRawToDigi::produce().

◆ boardId()

const cms_uint16_t L1GtfeWord::boardId ( ) const
inline

get/set board ID

get BoardId value

Definition at line 58 of file L1GtfeWord.h.

58 { return m_boardId; }

References m_boardId.

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

◆ bstFlag()

const int L1GtfeWord::bstFlag ( ) const

get / set BST flag: 0 or 1 - via setup version (no private member)

Definition at line 173 of file L1GtfeWord.cc.

173  {
174  int bstFlagValue = 0;
175  bstFlagValue = static_cast<int>(m_setupVersion & BstFlagMask);
176 
177  return bstFlagValue;
178 }

References BstFlagMask, and m_setupVersion.

◆ bxNr()

const cms_uint16_t L1GtfeWord::bxNr ( ) const
inline

get/set bunch cross number as counted in the GTFE board

Definition at line 93 of file L1GtfeWord.h.

93 { return m_bxNr; }

References m_bxNr.

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

◆ getSize()

const unsigned int L1GtfeWord::getSize ( ) const
inline

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

Definition at line 160 of file L1GtfeWord.h.

160  {
161  int unitLengthBits = L1GlobalTriggerReadoutSetup::UnitLength;
162 
163  return BlockSize * unitLengthBits;
164  }

References BlockSize, and L1GlobalTriggerReadoutSetup::UnitLength.

Referenced by L1GtfeExtWord::getSize(), L1GTDigiToRaw::packGTFE(), L1GTDigiToRaw::produce(), L1GlobalTriggerRawToDigi::produce(), and L1GtfeExtWord::unpack().

◆ operator!=()

bool L1GtfeWord::operator!= ( const L1GtfeWord result) const

unequal operator

Definition at line 107 of file L1GtfeWord.cc.

107 { return !(result == *this); }

References mps_fire::result.

◆ operator==()

bool L1GtfeWord::operator== ( const L1GtfeWord result) const

equal operator

Definition at line 69 of file L1GtfeWord.cc.

69  {
70  if (m_boardId != result.m_boardId) {
71  return false;
72  }
73 
74  if (m_recordLength1 != result.m_recordLength1) {
75  return false;
76  }
77 
78  if (m_recordLength != result.m_recordLength) {
79  return false;
80  }
81 
82  if (m_bxNr != result.m_bxNr) {
83  return false;
84  }
85 
86  if (m_setupVersion != result.m_setupVersion) {
87  return false;
88  }
89 
90  if (m_activeBoards != result.m_activeBoards) {
91  return false;
92  }
93 
94  if (m_altNrBxBoard != result.m_altNrBxBoard) {
95  return false;
96  }
97 
98  if (m_totalTriggerNr != result.m_totalTriggerNr) {
99  return false;
100  }
101 
102  // all members identical
103  return true;
104 }

References m_activeBoards, m_altNrBxBoard, m_boardId, m_bxNr, m_recordLength, m_recordLength1, m_setupVersion, m_totalTriggerNr, and mps_fire::result.

◆ print()

void L1GtfeWord::print ( std::ostream &  myCout) const
virtual

pretty print the content of a L1GtfeWord

Reimplemented in L1GtfeExtWord.

Definition at line 253 of file L1GtfeWord.cc.

253  {
254  myCout << "\n L1GtfeWord::print \n" << std::endl;
255 
256  myCout << " BoardId: " << std::hex << " hex: "
257  << " " << std::setw(2) << std::setfill('0') << m_boardId << std::setfill(' ') << std::dec
258  << " dec: " << m_boardId << std::endl;
259 
260  myCout << " BX for alternative 1: " << std::hex << " hex: "
261  << " " << std::setw(1) << m_recordLength1 << std::dec << " dec: " << m_recordLength1 << std::endl;
262 
263  myCout << " BX for alternative 0: " << std::hex << " hex: "
264  << " " << std::setw(1) << m_recordLength << std::dec << " dec: " << m_recordLength << std::endl;
265 
266  myCout << " BxNr: " << std::hex << " hex: "
267  << " " << std::setw(3) << std::setfill('0') << m_bxNr << std::setfill(' ') << std::dec
268  << " dec: " << m_bxNr << std::endl;
269 
270  myCout << " SetupVersion: " << std::hex << " hex: " << std::setw(8) << std::setfill('0') << m_setupVersion
271  << std::setfill(' ') << std::dec << " dec: " << m_setupVersion << std::endl;
272 
273  //
274 
275  myCout << " ActiveBoards: " << std::hex << " hex: "
276  << " " << std::setw(4) << std::setfill('0') << m_activeBoards << std::setfill(' ') << std::dec
277  << " dec: " << m_activeBoards << std::endl;
278 
279  myCout << " AltNrBxBoard: " << std::hex << " hex: "
280  << " " << std::setw(4) << std::setfill('0') << m_altNrBxBoard << std::setfill(' ') << std::dec
281  << " dec: " << m_altNrBxBoard << std::endl;
282 
283  myCout << " TotalTriggerNr: " << std::hex << " hex: " << std::setw(8) << std::setfill('0') << m_totalTriggerNr
284  << std::setfill(' ') << std::dec << " dec: " << m_totalTriggerNr << std::endl;
285 }

References TauDecayModes::dec, m_activeBoards, m_altNrBxBoard, m_boardId, m_bxNr, m_recordLength, m_recordLength1, m_setupVersion, and m_totalTriggerNr.

Referenced by L1GtPackUnpackAnalyzer::analyzeGT(), L1GtDataEmulAnalyzer::compareGTFE(), L1GtHwValidation::compareGTFE(), L1GtfeExtWord::print(), L1GlobalTriggerReadoutRecord::print(), L1GTDigiToRaw::produce(), and L1GlobalTriggerRawToDigi::produce().

◆ recordLength()

const cms_uint16_t L1GtfeWord::recordLength ( ) const
inline

◆ recordLength1()

const cms_uint16_t L1GtfeWord::recordLength1 ( ) const
inline

◆ reset()

void L1GtfeWord::reset ( void  )
virtual

reset the content of a L1GtfeWord

Reimplemented in L1GtfeExtWord.

Definition at line 240 of file L1GtfeWord.cc.

240  {
241  m_boardId = 0;
242  m_recordLength1 = 0;
243  m_recordLength = 0;
244  m_bxNr = 0;
245  m_setupVersion = 0;
246  //
247  m_activeBoards = 0;
248  m_altNrBxBoard = 0;
249  m_totalTriggerNr = 0;
250 }

References m_activeBoards, m_altNrBxBoard, m_boardId, m_bxNr, m_recordLength, m_recordLength1, m_setupVersion, and m_totalTriggerNr.

Referenced by L1GlobalTriggerRawToDigi::produce(), L1GtfeExtWord::reset(), and L1GlobalTriggerReadoutRecord::reset().

◆ setActiveBoards() [1/2]

void L1GtfeWord::setActiveBoards ( cms_uint16_t  activeBoardsValue)
inline

Definition at line 121 of file L1GtfeWord.h.

121 { m_activeBoards = activeBoardsValue; }

References m_activeBoards.

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

◆ setActiveBoards() [2/2]

void L1GtfeWord::setActiveBoards ( const cms_uint64_t word64)

Definition at line 185 of file L1GtfeWord.cc.

185  {
187 }

References ActiveBoardsMask, ActiveBoardsShift, and m_activeBoards.

◆ setActiveBoardsWord64() [1/2]

void L1GtfeWord::setActiveBoardsWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 191 of file L1GtfeWord.cc.

191  {
192  if (iWord == ActiveBoardsWord) {
193  word64 = word64 | (static_cast<cms_uint64_t>(m_activeBoards) << ActiveBoardsShift);
194  }
195 }

References ActiveBoardsShift, ActiveBoardsWord, and m_activeBoards.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setActiveBoardsWord64() [2/2]

void L1GtfeWord::setActiveBoardsWord64 ( cms_uint64_t word64,
int  iWord,
cms_int16_t  activeBoardsValue 
)

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

Definition at line 199 of file L1GtfeWord.cc.

199  {
200  if (iWord == ActiveBoardsWord) {
201  word64 = word64 | (static_cast<cms_uint64_t>(activeBoardsValue) << ActiveBoardsShift);
202  }
203 }

References ActiveBoardsShift, and ActiveBoardsWord.

◆ setAltNrBxBoard() [1/2]

void L1GtfeWord::setAltNrBxBoard ( cms_uint16_t  altNrBxBoardValue)
inline

Definition at line 136 of file L1GtfeWord.h.

136 { m_altNrBxBoard = altNrBxBoardValue; }

References m_altNrBxBoard.

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

◆ setAltNrBxBoard() [2/2]

void L1GtfeWord::setAltNrBxBoard ( const cms_uint64_t word64)

Definition at line 206 of file L1GtfeWord.cc.

206  {
208 }

References AltNrBxBoardMask, AltNrBxBoardShift, and m_altNrBxBoard.

◆ setAltNrBxBoardWord64() [1/2]

void L1GtfeWord::setAltNrBxBoardWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 212 of file L1GtfeWord.cc.

212  {
213  if (iWord == AltNrBxBoardWord) {
214  word64 = word64 | (static_cast<cms_uint64_t>(m_altNrBxBoard) << AltNrBxBoardShift);
215  }
216 }

References AltNrBxBoardShift, AltNrBxBoardWord, and m_altNrBxBoard.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setAltNrBxBoardWord64() [2/2]

void L1GtfeWord::setAltNrBxBoardWord64 ( cms_uint64_t word64,
int  iWord,
cms_int16_t  altNrBxBoardValue 
)

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

Definition at line 220 of file L1GtfeWord.cc.

220  {
221  if (iWord == AltNrBxBoardWord) {
222  word64 = word64 | (static_cast<cms_uint64_t>(altNrBxBoardValue) << AltNrBxBoardShift);
223  }
224 }

References AltNrBxBoardShift, and AltNrBxBoardWord.

◆ setBoardId() [1/2]

void L1GtfeWord::setBoardId ( cms_uint16_t  boardIdValue)
inline

set BoardId from a BoardId value

Definition at line 61 of file L1GtfeWord.h.

61 { m_boardId = boardIdValue; }

References m_boardId.

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

◆ setBoardId() [2/2]

void L1GtfeWord::setBoardId ( const cms_uint64_t word64)

set the BoardId value from a 64-bits word

Definition at line 112 of file L1GtfeWord.cc.

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

References BoardIdMask, BoardIdShift, and m_boardId.

◆ setBoardIdWord64()

void L1GtfeWord::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 116 of file L1GtfeWord.cc.

116  {
117  if (iWord == BoardIdWord) {
118  word64 = word64 | (static_cast<cms_uint64_t>(m_boardId) << BoardIdShift);
119  }
120 }

References BoardIdShift, BoardIdWord, and m_boardId.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setBstFlag()

void L1GtfeWord::setBstFlag ( const int  bstFlagValue)

Definition at line 180 of file L1GtfeWord.cc.

180  {
181  m_setupVersion = m_setupVersion | (static_cast<cms_uint32_t>(bstFlagValue) & BstFlagMask);
182 }

References BstFlagMask, and m_setupVersion.

◆ setBxNr() [1/2]

void L1GtfeWord::setBxNr ( cms_uint16_t  bxNrValue)
inline

Definition at line 95 of file L1GtfeWord.h.

95 { m_bxNr = bxNrValue; }

References m_bxNr.

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

◆ setBxNr() [2/2]

void L1GtfeWord::setBxNr ( const cms_uint64_t word64)

Definition at line 149 of file L1GtfeWord.cc.

149 { m_bxNr = (word64 & BxNrMask) >> BxNrShift; }

References BxNrMask, BxNrShift, and m_bxNr.

◆ setBxNrWord64()

void L1GtfeWord::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 153 of file L1GtfeWord.cc.

153  {
154  if (iWord == BxNrWord) {
155  word64 = word64 | (static_cast<cms_uint64_t>(m_bxNr) << BxNrShift);
156  }
157 }

References BxNrShift, BxNrWord, and m_bxNr.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setRecordLength() [1/2]

void L1GtfeWord::setRecordLength ( cms_uint16_t  recordLengthValue)
inline

Definition at line 84 of file L1GtfeWord.h.

84 { m_recordLength = recordLengthValue; }

References m_recordLength.

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

◆ setRecordLength() [2/2]

void L1GtfeWord::setRecordLength ( const cms_uint64_t word64)

Definition at line 136 of file L1GtfeWord.cc.

136  {
138 }

References m_recordLength, RecordLengthMask, and RecordLengthShift.

◆ setRecordLength1() [1/2]

void L1GtfeWord::setRecordLength1 ( cms_uint16_t  recordLengthValue)
inline

◆ setRecordLength1() [2/2]

void L1GtfeWord::setRecordLength1 ( const cms_uint64_t word64)

Definition at line 123 of file L1GtfeWord.cc.

123  {
125 }

References m_recordLength1, RecordLength1Mask, and RecordLength1Shift.

◆ setRecordLength1Word64()

void L1GtfeWord::setRecordLength1Word64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 129 of file L1GtfeWord.cc.

129  {
130  if (iWord == RecordLength1Word) {
131  word64 = word64 | (static_cast<cms_uint64_t>(m_recordLength1) << RecordLength1Shift);
132  }
133 }

References m_recordLength1, RecordLength1Shift, and RecordLength1Word.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setRecordLengthWord64()

void L1GtfeWord::setRecordLengthWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 142 of file L1GtfeWord.cc.

142  {
143  if (iWord == RecordLengthWord) {
144  word64 = word64 | (static_cast<cms_uint64_t>(m_recordLength) << RecordLengthShift);
145  }
146 }

References m_recordLength, RecordLengthShift, and RecordLengthWord.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setSetupVersion() [1/2]

void L1GtfeWord::setSetupVersion ( cms_uint32_t  setupVersionValue)
inline

Definition at line 106 of file L1GtfeWord.h.

106 { m_setupVersion = setupVersionValue; }

References m_setupVersion.

Referenced by unpack().

◆ setSetupVersion() [2/2]

void L1GtfeWord::setSetupVersion ( const cms_uint64_t word64)

Definition at line 160 of file L1GtfeWord.cc.

160  {
162 }

References m_setupVersion, SetupVersionMask, and SetupVersionShift.

◆ setSetupVersionWord64()

void L1GtfeWord::setSetupVersionWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 166 of file L1GtfeWord.cc.

166  {
167  if (iWord == SetupVersionWord) {
168  word64 = word64 | (static_cast<cms_uint64_t>(m_setupVersion) << SetupVersionShift);
169  }
170 }

References m_setupVersion, SetupVersionShift, and SetupVersionWord.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setTotalTriggerNr() [1/2]

void L1GtfeWord::setTotalTriggerNr ( cms_uint32_t  totalTriggerNrValue)
inline

Definition at line 151 of file L1GtfeWord.h.

151 { m_totalTriggerNr = totalTriggerNrValue; }

References m_totalTriggerNr.

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

◆ setTotalTriggerNr() [2/2]

void L1GtfeWord::setTotalTriggerNr ( const cms_uint64_t word64)

Definition at line 227 of file L1GtfeWord.cc.

227  {
229 }

References m_totalTriggerNr, TotalTriggerNrMask, and TotalTriggerNrShift.

◆ setTotalTriggerNrWord64()

void L1GtfeWord::setTotalTriggerNrWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 233 of file L1GtfeWord.cc.

233  {
234  if (iWord == TotalTriggerNrWord) {
235  word64 = word64 | (static_cast<cms_uint64_t>(m_totalTriggerNr) << TotalTriggerNrShift);
236  }
237 }

References m_totalTriggerNr, TotalTriggerNrShift, and TotalTriggerNrWord.

Referenced by L1GTEvmDigiToRaw::packGTFE(), and L1GTDigiToRaw::packGTFE().

◆ setupVersion()

const cms_uint32_t L1GtfeWord::setupVersion ( ) const
inline

get/set setup version

Definition at line 104 of file L1GtfeWord.h.

104 { return m_setupVersion; }

References m_setupVersion.

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

◆ totalTriggerNr()

const cms_uint32_t L1GtfeWord::totalTriggerNr ( ) const
inline

get/set total number of L1A sent since start of run

Definition at line 149 of file L1GtfeWord.h.

149 { return m_totalTriggerNr; }

References m_totalTriggerNr.

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

◆ unpack()

void L1GtfeWord::unpack ( const unsigned char *  gtfePtr)
virtual

unpack GTFE gtfePtr pointer to the beginning of the GTFE block in the raw data

Reimplemented in L1GtfeExtWord.

Definition at line 290 of file L1GtfeWord.cc.

290  {
291  LogDebug("L1GtfeWord") << "\nUnpacking GTFE block.\n" << std::endl;
292 
293  const cms_uint64_t* payload = reinterpret_cast<cms_uint64_t const*>(gtfePtr);
294 
303 
304  if (edm::isDebugEnabled()) {
305  for (int iWord = 0; iWord < BlockSize; ++iWord) {
306  LogTrace("L1GtfeWord") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16)
307  << payload[iWord] << std::dec << std::setfill(' ') << std::endl;
308  }
309  }
310 }

References ActiveBoardsWord, AltNrBxBoardWord, BlockSize, BoardIdWord, BxNrWord, TauDecayModes::dec, edm::isDebugEnabled(), LogDebug, LogTrace, jets_cff::payload, RecordLength1Word, RecordLengthWord, setActiveBoards(), setAltNrBxBoard(), setBoardId(), setBxNr(), setRecordLength(), setRecordLength1(), setSetupVersion(), setTotalTriggerNr(), SetupVersionWord, and TotalTriggerNrWord.

Referenced by L1GlobalTriggerRawToDigi::produce(), and L1GtfeExtWord::unpack().

Member Data Documentation

◆ ActiveBoardsMask

const cms_uint64_t L1GtfeWord::ActiveBoardsMask = 0xFFFF000000000000ULL
staticprivate

Definition at line 209 of file L1GtfeWord.h.

Referenced by setActiveBoards().

◆ ActiveBoardsShift

const int L1GtfeWord::ActiveBoardsShift = 48
staticprivate

Definition at line 213 of file L1GtfeWord.h.

Referenced by setActiveBoards(), and setActiveBoardsWord64().

◆ ActiveBoardsWord

const int L1GtfeWord::ActiveBoardsWord = 1
staticprivate

Definition at line 205 of file L1GtfeWord.h.

Referenced by setActiveBoardsWord64(), and unpack().

◆ AltNrBxBoardMask

const cms_uint64_t L1GtfeWord::AltNrBxBoardMask = 0x0000FFFF00000000ULL
staticprivate

Definition at line 210 of file L1GtfeWord.h.

Referenced by setAltNrBxBoard().

◆ AltNrBxBoardShift

const int L1GtfeWord::AltNrBxBoardShift = 32
staticprivate

Definition at line 214 of file L1GtfeWord.h.

Referenced by setAltNrBxBoard(), and setAltNrBxBoardWord64().

◆ AltNrBxBoardWord

const int L1GtfeWord::AltNrBxBoardWord = 1
staticprivate

Definition at line 206 of file L1GtfeWord.h.

Referenced by setAltNrBxBoardWord64(), and unpack().

◆ BlockSize

const int L1GtfeWord::BlockSize = 2
staticprivate

Definition at line 181 of file L1GtfeWord.h.

Referenced by getSize(), and unpack().

◆ BoardIdMask

const cms_uint64_t L1GtfeWord::BoardIdMask = 0xFF00000000000000ULL
staticprivate

Definition at line 189 of file L1GtfeWord.h.

Referenced by setBoardId().

◆ BoardIdShift

const int L1GtfeWord::BoardIdShift = 56
staticprivate

Definition at line 198 of file L1GtfeWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

◆ BoardIdWord

const int L1GtfeWord::BoardIdWord = 0
staticprivate

Definition at line 183 of file L1GtfeWord.h.

Referenced by setBoardIdWord64(), and unpack().

◆ BstFlagMask

const cms_uint32_t L1GtfeWord::BstFlagMask = 0x0001
staticprivate

Definition at line 195 of file L1GtfeWord.h.

Referenced by bstFlag(), and setBstFlag().

◆ BxNrMask

const cms_uint64_t L1GtfeWord::BxNrMask = 0x00000FFF00000000ULL
staticprivate

Definition at line 192 of file L1GtfeWord.h.

Referenced by setBxNr().

◆ BxNrShift

const int L1GtfeWord::BxNrShift = 32
staticprivate

Definition at line 201 of file L1GtfeWord.h.

Referenced by setBxNr(), and setBxNrWord64().

◆ BxNrWord

const int L1GtfeWord::BxNrWord = 0
staticprivate

Definition at line 186 of file L1GtfeWord.h.

Referenced by setBxNrWord64(), and unpack().

◆ m_activeBoards

cms_uint16_t L1GtfeWord::m_activeBoards
private

active boards contributing to EVM respectively DAQ record

Definition at line 232 of file L1GtfeWord.h.

Referenced by activeBoards(), operator==(), print(), reset(), setActiveBoards(), and setActiveBoardsWord64().

◆ m_altNrBxBoard

cms_uint16_t L1GtfeWord::m_altNrBxBoard
private

alternative for number of BX per board correlated with active boards bit value is 0: take alternative 0 bit value is 1: take alternative 1

Definition at line 238 of file L1GtfeWord.h.

Referenced by altNrBxBoard(), operator==(), print(), reset(), setAltNrBxBoard(), and setAltNrBxBoardWord64().

◆ m_boardId

cms_uint16_t L1GtfeWord::m_boardId
private

board identifier

Definition at line 219 of file L1GtfeWord.h.

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

◆ m_bxNr

cms_uint16_t L1GtfeWord::m_bxNr
private

bunch cross number as counted in the GTFE board

Definition at line 228 of file L1GtfeWord.h.

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

◆ m_recordLength

cms_uint16_t L1GtfeWord::m_recordLength
private

record length for alternative 0

Definition at line 225 of file L1GtfeWord.h.

Referenced by operator==(), print(), recordLength(), reset(), setRecordLength(), and setRecordLengthWord64().

◆ m_recordLength1

cms_uint16_t L1GtfeWord::m_recordLength1
private

record length for alternative 1

Definition at line 222 of file L1GtfeWord.h.

Referenced by operator==(), print(), recordLength1(), reset(), setRecordLength1(), and setRecordLength1Word64().

◆ m_setupVersion

cms_uint32_t L1GtfeWord::m_setupVersion
private

◆ m_totalTriggerNr

cms_uint32_t L1GtfeWord::m_totalTriggerNr
private

total number of L1A sent since start of run

Definition at line 241 of file L1GtfeWord.h.

Referenced by operator==(), print(), reset(), setTotalTriggerNr(), setTotalTriggerNrWord64(), and totalTriggerNr().

◆ RecordLength1Mask

const cms_uint64_t L1GtfeWord::RecordLength1Mask = 0x00F0000000000000ULL
staticprivate

Definition at line 190 of file L1GtfeWord.h.

Referenced by setRecordLength1().

◆ RecordLength1Shift

const int L1GtfeWord::RecordLength1Shift = 52
staticprivate

Definition at line 199 of file L1GtfeWord.h.

Referenced by setRecordLength1(), and setRecordLength1Word64().

◆ RecordLength1Word

const int L1GtfeWord::RecordLength1Word = 0
staticprivate

Definition at line 184 of file L1GtfeWord.h.

Referenced by setRecordLength1Word64(), and unpack().

◆ RecordLengthMask

const cms_uint64_t L1GtfeWord::RecordLengthMask = 0x000F000000000000ULL
staticprivate

Definition at line 191 of file L1GtfeWord.h.

Referenced by setRecordLength().

◆ RecordLengthShift

const int L1GtfeWord::RecordLengthShift = 48
staticprivate

Definition at line 200 of file L1GtfeWord.h.

Referenced by setRecordLength(), and setRecordLengthWord64().

◆ RecordLengthWord

const int L1GtfeWord::RecordLengthWord = 0
staticprivate

Definition at line 185 of file L1GtfeWord.h.

Referenced by setRecordLengthWord64(), and unpack().

◆ SetupVersionMask

const cms_uint64_t L1GtfeWord::SetupVersionMask = 0x00000000FFFFFFFFULL
staticprivate

Definition at line 193 of file L1GtfeWord.h.

Referenced by setSetupVersion().

◆ SetupVersionShift

const int L1GtfeWord::SetupVersionShift = 0
staticprivate

Definition at line 202 of file L1GtfeWord.h.

Referenced by setSetupVersion(), and setSetupVersionWord64().

◆ SetupVersionWord

const int L1GtfeWord::SetupVersionWord = 0
staticprivate

Definition at line 187 of file L1GtfeWord.h.

Referenced by setSetupVersionWord64(), and unpack().

◆ TotalTriggerNrMask

const cms_uint64_t L1GtfeWord::TotalTriggerNrMask = 0x00000000FFFFFFFFULL
staticprivate

Definition at line 211 of file L1GtfeWord.h.

Referenced by setTotalTriggerNr().

◆ TotalTriggerNrShift

const int L1GtfeWord::TotalTriggerNrShift = 0
staticprivate

Definition at line 215 of file L1GtfeWord.h.

Referenced by setTotalTriggerNr(), and setTotalTriggerNrWord64().

◆ TotalTriggerNrWord

const int L1GtfeWord::TotalTriggerNrWord = 1
staticprivate

Definition at line 207 of file L1GtfeWord.h.

Referenced by setTotalTriggerNrWord64(), and unpack().

L1GtfeWord::BoardIdShift
static const int BoardIdShift
Definition: L1GtfeWord.h:198
L1GtfeWord::SetupVersionMask
static const cms_uint64_t SetupVersionMask
Definition: L1GtfeWord.h:193
L1GlobalTriggerReadoutSetup::UnitLength
static const int UnitLength
one unit in the word is UnitLength bits
Definition: L1GlobalTriggerReadoutSetup.h:56
L1GtfeWord::m_recordLength1
cms_uint16_t m_recordLength1
record length for alternative 1
Definition: L1GtfeWord.h:222
L1GtfeWord::AltNrBxBoardWord
static const int AltNrBxBoardWord
Definition: L1GtfeWord.h:206
L1GtfeWord::BstFlagMask
static const cms_uint32_t BstFlagMask
Definition: L1GtfeWord.h:195
L1GtfeWord::BoardIdWord
static const int BoardIdWord
Definition: L1GtfeWord.h:183
L1GtfeWord::RecordLengthWord
static const int RecordLengthWord
Definition: L1GtfeWord.h:185
L1GtfeWord::setTotalTriggerNr
void setTotalTriggerNr(cms_uint32_t totalTriggerNrValue)
Definition: L1GtfeWord.h:151
L1GtfeWord::BlockSize
static const int BlockSize
Definition: L1GtfeWord.h:181
L1GtfeWord::setRecordLength
void setRecordLength(cms_uint16_t recordLengthValue)
Definition: L1GtfeWord.h:84
L1GtfeWord::BxNrWord
static const int BxNrWord
Definition: L1GtfeWord.h:186
L1GtfeWord::setRecordLength1
void setRecordLength1(cms_uint16_t recordLengthValue)
Definition: L1GtfeWord.h:73
L1GtfeWord::SetupVersionShift
static const int SetupVersionShift
Definition: L1GtfeWord.h:202
L1GtfeWord::m_totalTriggerNr
cms_uint32_t m_totalTriggerNr
total number of L1A sent since start of run
Definition: L1GtfeWord.h:241
L1GtfeWord::RecordLength1Shift
static const int RecordLength1Shift
Definition: L1GtfeWord.h:199
L1GtfeWord::m_recordLength
cms_uint16_t m_recordLength
record length for alternative 0
Definition: L1GtfeWord.h:225
L1GtfeWord::SetupVersionWord
static const int SetupVersionWord
Definition: L1GtfeWord.h:187
L1GtfeWord::TotalTriggerNrShift
static const int TotalTriggerNrShift
Definition: L1GtfeWord.h:215
L1GtfeWord::RecordLength1Mask
static const cms_uint64_t RecordLength1Mask
Definition: L1GtfeWord.h:190
L1GtfeWord::ActiveBoardsWord
static const int ActiveBoardsWord
Definition: L1GtfeWord.h:205
L1GtfeWord::setActiveBoards
void setActiveBoards(cms_uint16_t activeBoardsValue)
Definition: L1GtfeWord.h:121
L1GtfeWord::TotalTriggerNrMask
static const cms_uint64_t TotalTriggerNrMask
Definition: L1GtfeWord.h:211
jets_cff.payload
payload
Definition: jets_cff.py:34
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
L1GtfeWord::m_setupVersion
cms_uint32_t m_setupVersion
Definition: L1GtfeWord.h:229
L1GtfeWord::TotalTriggerNrWord
static const int TotalTriggerNrWord
Definition: L1GtfeWord.h:207
L1GtfeWord::BxNrMask
static const cms_uint64_t BxNrMask
Definition: L1GtfeWord.h:192
L1GtfeWord::RecordLengthShift
static const int RecordLengthShift
Definition: L1GtfeWord.h:200
L1GtfeWord::m_activeBoards
cms_uint16_t m_activeBoards
active boards contributing to EVM respectively DAQ record
Definition: L1GtfeWord.h:232
L1GtfeWord::ActiveBoardsShift
static const int ActiveBoardsShift
Definition: L1GtfeWord.h:213
cms_uint64_t
unsigned long long cms_uint64_t
Definition: typedefs.h:17
L1GtfeWord::RecordLengthMask
static const cms_uint64_t RecordLengthMask
Definition: L1GtfeWord.h:191
L1GtfeWord::m_boardId
cms_uint16_t m_boardId
board identifier
Definition: L1GtfeWord.h:219
L1GtfeWord::setAltNrBxBoard
void setAltNrBxBoard(cms_uint16_t altNrBxBoardValue)
Definition: L1GtfeWord.h:136
L1GtfeWord::AltNrBxBoardMask
static const cms_uint64_t AltNrBxBoardMask
Definition: L1GtfeWord.h:210
L1GtfeWord::BxNrShift
static const int BxNrShift
Definition: L1GtfeWord.h:201
L1GtfeWord::m_altNrBxBoard
cms_uint16_t m_altNrBxBoard
Definition: L1GtfeWord.h:238
L1GtfeWord::m_bxNr
cms_uint16_t m_bxNr
bunch cross number as counted in the GTFE board
Definition: L1GtfeWord.h:228
L1GtfeWord::ActiveBoardsMask
static const cms_uint64_t ActiveBoardsMask
Definition: L1GtfeWord.h:209
L1GtfeWord::AltNrBxBoardShift
static const int AltNrBxBoardShift
Definition: L1GtfeWord.h:214
L1GtfeWord::setBxNr
void setBxNr(cms_uint16_t bxNrValue)
Definition: L1GtfeWord.h:95
L1GtfeWord::BoardIdMask
static const cms_uint64_t BoardIdMask
Definition: L1GtfeWord.h:189
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:71
L1GtfeWord::setBoardId
void setBoardId(cms_uint16_t boardIdValue)
set BoardId from a BoardId value
Definition: L1GtfeWord.h:61
mps_fire.result
result
Definition: mps_fire.py:303
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
L1GtfeWord::setSetupVersion
void setSetupVersion(cms_uint32_t setupVersionValue)
Definition: L1GtfeWord.h:106
L1GtfeWord::RecordLength1Word
static const int RecordLength1Word
Definition: L1GtfeWord.h:184
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143