CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes
L1GtPsbWord Class Reference

#include <L1GtPsbWord.h>

Public Member Functions

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

Static Public Attributes

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

Private Attributes

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

Static Private Attributes

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

Detailed Description

Description: PSB block in the L1 GT readout record.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 29 of file L1GtPsbWord.h.

Constructor & Destructor Documentation

L1GtPsbWord::L1GtPsbWord ( )

constructors

Definition at line 28 of file L1GtPsbWord.cc.

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

29 {
30 
31  m_boardId = 0;
32  m_bxInEvent = 0;
33  m_bxNr = 0;
34  m_eventNr = 0;
35 
36  for (int iA = 0; iA < NumberAData; ++iA) {
37  m_aData[iA] = 0;
38  }
39 
40  for (int iB = 0; iB < NumberBData; ++iB) {
41  m_bData[iB] = 0;
42  }
43 
44  m_localBxNr = 0;
45 
46 }
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
static const int NumberBData
Definition: L1GtPsbWord.h:35
static const int NumberAData
Definition: L1GtPsbWord.h:34
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
L1GtPsbWord::L1GtPsbWord ( cms_uint16_t  boardIdValue,
int  bxInEventValue,
cms_uint16_t  bxNrValue,
cms_uint32_t  eventNrValue,
cms_uint16_t  aDataValue[NumberAData],
cms_uint16_t  bDataValue[NumberBData],
cms_uint16_t  localBxNrValue 
)

constructor from unpacked values;

Definition at line 49 of file L1GtPsbWord.cc.

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

58 {
59 
60  m_boardId = boardIdValue;
61  m_bxInEvent = bxInEventValue;
62  m_bxNr = bxNrValue;
63  m_eventNr = eventNrValue;
64 
65  for (int iA = 0; iA < NumberAData; ++iA) {
66  m_aData[iA] = aDataValue[iA];
67  }
68 
69  for (int iB = 0; iB < NumberBData; ++iB) {
70  m_bData[iB] = bDataValue[iB];
71  }
72 
73  m_localBxNr = localBxNrValue;
74 
75 }
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
static const int NumberBData
Definition: L1GtPsbWord.h:35
static const int NumberAData
Definition: L1GtPsbWord.h:34
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
L1GtPsbWord::~L1GtPsbWord ( )
virtual

destructor

Definition at line 78 of file L1GtPsbWord.cc.

79 {
80 
81  // empty now
82 
83 }

Member Function Documentation

const cms_uint16_t L1GtPsbWord::aData ( int  iA) const

get/set A_DATA_CH_IA

Definition at line 228 of file L1GtPsbWord.cc.

References edm::hlt::Exception, m_aData, and NumberAData.

Referenced by ecaldqm::ClusterTask::beginEvent(), L1GtDataEmulAnalyzer::comparePSB(), L1GtHwValidation::comparePSB(), EcalCosmicsHists::determineTriggers(), EcalExclusiveTrigFilter::filter(), and triggerExpression::L1TechReader::operator()().

229 {
230 
231  if (iA < 0 || iA > NumberAData) {
232  throw cms::Exception("aDataIndexError")
233  << "\nError: index for A_DATA array out of range. Allowed range: [0, "
234  << NumberAData << ") " << std::endl;
235 
236  } else {
237  return m_aData[iA];
238  }
239 
240 }
static const int NumberAData
Definition: L1GtPsbWord.h:34
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
const cms_uint16_t L1GtPsbWord::bData ( int  iB) const

get/set B_DATA_CH_IB

Definition at line 323 of file L1GtPsbWord.cc.

References edm::hlt::Exception, m_bData, and NumberBData.

Referenced by ecaldqm::ClusterTask::beginEvent(), L1GtDataEmulAnalyzer::comparePSB(), L1GtHwValidation::comparePSB(), EcalCosmicsHists::determineTriggers(), EcalExclusiveTrigFilter::filter(), and triggerExpression::L1TechReader::operator()().

324 {
325 
326  if (iB < 0 || iB > NumberBData) {
327  throw cms::Exception("bDataIndexError")
328  << "\nError: index for B_DATA array out of range. Allowed range: [0, "
329  << NumberBData << ") " << std::endl;
330 
331  } else {
332  return m_bData[iB];
333  }
334 
335 }
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
static const int NumberBData
Definition: L1GtPsbWord.h:35
const cms_uint16_t L1GtPsbWord::boardId ( ) const
inline
const int L1GtPsbWord::bxInEvent ( ) const
inline

get/set bunch cross in the GT event record

Definition at line 87 of file L1GtPsbWord.h.

References m_bxInEvent.

Referenced by L1GtPackUnpackAnalyzer::analyzeGT(), L1GtDataEmulAnalyzer::compareDaqRecord(), L1GtHwValidation::compareDaqRecord(), L1GtDataEmulAnalyzer::comparePSB(), and L1GtHwValidation::comparePSB().

88  {
89  return m_bxInEvent;
90  }
const cms_uint16_t L1GtPsbWord::bxNr ( ) const
inline

get/set bunch cross number of the actual bx

Definition at line 108 of file L1GtPsbWord.h.

References m_bxNr.

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

109  {
110  return m_bxNr;
111  }
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
const cms_uint32_t L1GtPsbWord::eventNr ( ) const
inline

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

Definition at line 129 of file L1GtPsbWord.h.

References m_eventNr.

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

130  {
131  return m_eventNr;
132  }
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
const unsigned int L1GtPsbWord::getSize ( ) const
inline

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

Definition at line 198 of file L1GtPsbWord.h.

References BlockSize, and L1GlobalTriggerReadoutSetup::UnitLength.

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

199  {
200  int unitLengthBits = L1GlobalTriggerReadoutSetup::UnitLength;
201 
202  return BlockSize*unitLengthBits;
203  }
static const int BlockSize
Definition: L1GtPsbWord.h:219
static const int UnitLength
one unit in the word is UnitLength bits
const cms_uint16_t L1GtPsbWord::localBxNr ( ) const
inline

get/set local bunch cross number of the actual bx

Definition at line 178 of file L1GtPsbWord.h.

References m_localBxNr.

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

179  {
180  return m_localBxNr;
181  }
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
bool L1GtPsbWord::operator!= ( const L1GtPsbWord result) const

unequal operator

Definition at line 124 of file L1GtPsbWord.cc.

125 {
126 
127  return !( result == *this);
128 
129 }
bool L1GtPsbWord::operator== ( const L1GtPsbWord result) const

equal operator

Definition at line 86 of file L1GtPsbWord.cc.

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

87 {
88 
89  if (m_boardId != result.m_boardId) {
90  return false;
91  }
92  if (m_bxInEvent != result.m_bxInEvent) {
93  return false;
94  }
95  if (m_bxNr != result.m_bxNr) {
96  return false;
97  }
98  if (m_eventNr != result.m_eventNr) {
99  return false;
100  }
101 
102  for (int iA = 0; iA < NumberAData; ++iA) {
103  if (m_aData[iA] != result.m_aData[iA]) {
104  return false;
105  }
106  }
107 
108  for (int iB = 0; iB < NumberBData; ++iB) {
109  if (m_bData[iB] != result.m_bData[iB]) {
110  return false;
111  }
112  }
113 
114  if (m_localBxNr != result.m_localBxNr) {
115  return false;
116  }
117 
118  // all members identical
119  return true;
120 
121 }
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
static const int NumberBData
Definition: L1GtPsbWord.h:35
static const int NumberAData
Definition: L1GtPsbWord.h:34
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
void L1GtPsbWord::print ( std::ostream &  myCout) const

pretty print

Definition at line 453 of file L1GtPsbWord.cc.

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

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

454 {
455 
456  myCout << "\n L1GtPsbWord::print \n" << std::endl;
457 
458  myCout << " Board Id: "
459  << std::hex << " hex: " << std::setw(4) << std::setfill('0') << m_boardId
460  << std::setfill(' ')
461  << std::dec << " dec: " << m_boardId
462  << std::endl;
463 
464  int baseValue = 16; // using hexadecimal values;
465  int hexBxInEvent = (m_bxInEvent + baseValue)%baseValue;
466 
467  myCout << " BxInEvent: "
468  << std::hex << " hex: " << " " << std::setw(1) << hexBxInEvent
469  << std::dec << " dec: " << m_bxInEvent
470  << std::endl;
471 
472  myCout << " BxNr: "
473  << std::hex << " hex: " << " " << std::setw(3) << std::setfill('0') << m_bxNr
474  << std::setfill(' ')
475  << std::dec << " dec: " << m_bxNr
476  << std::endl;
477 
478 
479  myCout << " EventNr: "
480  << std::hex << " hex: " << " " << std::setw(6) << std::setfill('0') << m_eventNr
481  << std::setfill(' ')
482  << std::dec << " dec: " << m_eventNr
483  << std::endl;
484 
485  int sizeW64 = 64;
486  int dataBlocksPerLine = sizeW64/DataCHSize; // 4x16 bits per line
487 
488  myCout << "\n "
489  << "A_Data_CH3 "
490  << "A_Data_CH2 "
491  << "A_Data_CH1 "
492  << "A_Data_CH0 " << "\n"
493  << std::hex << " hex: " << std::setfill('0');
494 
495  for (int i = 0; i < dataBlocksPerLine; ++i) {
496 
497  int iCh = dataBlocksPerLine - (i + 1); // reverse
498  myCout << std::setw(4) << m_aData[iCh] << " ";
499 
500  }
501 
502  myCout << "\n"
503  << std::dec << " dec: ";
504 
505  for (int i = 0; i < dataBlocksPerLine; ++i) {
506 
507  int iCh = dataBlocksPerLine - (i + 1); // reverse
508  myCout << std::setw(5) << m_aData[iCh] << " ";
509 
510  }
511 
512  myCout << "\n\n "
513  << "A_Data_CH7 "
514  << "A_Data_CH6 "
515  << "A_Data_CH5 "
516  << "A_Data_CH4 " << "\n"
517  << std::hex << " hex: " << std::setfill('0');
518 
519  for (int i = 0; i < dataBlocksPerLine; ++i) {
520 
521  int iCh = dataBlocksPerLine - (i + 1); // reverse
522  myCout << std::setw(4) << m_aData[iCh + dataBlocksPerLine] << " ";
523 
524  }
525 
526  myCout << "\n"
527  << std::dec << " dec: ";
528 
529  for (int i = 0; i < dataBlocksPerLine; ++i) {
530 
531  int iCh = dataBlocksPerLine - (i + 1); // reverse
532  myCout << std::setw(5) << m_aData[iCh + dataBlocksPerLine] << " ";
533 
534  }
535 
536  myCout << std::endl;
537 
538  myCout << "\n "
539  << "B_Data_CH3 "
540  << "B_Data_CH2 "
541  << "B_Data_CH1 "
542  << "B_Data_CH0 " << "\n"
543  << std::hex << " hex: " << std::setfill('0');
544 
545  for (int i = 0; i < dataBlocksPerLine; ++i) {
546 
547  int iCh = dataBlocksPerLine - (i + 1); // reverse
548  myCout << std::setw(4) << m_bData[iCh] << " ";
549 
550  }
551 
552  myCout << "\n"
553  << std::dec << " dec: ";
554 
555  for (int i = 0; i < dataBlocksPerLine; ++i) {
556 
557  int iCh = dataBlocksPerLine - (i + 1); // reverse
558  myCout << std::setw(5) << m_bData[iCh] << " ";
559 
560  }
561 
562  myCout << "\n\n "
563  << "B_Data_CH7 "
564  << "B_Data_CH6 "
565  << "B_Data_CH5 "
566  << "B_Data_CH4 " << "\n"
567  << std::hex << " hex: " << std::setfill('0');
568 
569  for (int i = 0; i < dataBlocksPerLine; ++i) {
570 
571  int iCh = dataBlocksPerLine - (i + 1); // reverse
572  myCout << std::setw(4) << m_bData[iCh + dataBlocksPerLine] << " ";
573 
574  }
575 
576  myCout << "\n"
577  << std::dec << " dec: ";
578 
579  for (int i = 0; i < dataBlocksPerLine; ++i) {
580 
581  int iCh = dataBlocksPerLine - (i + 1); // reverse
582  myCout << std::setw(5) << m_bData[iCh + dataBlocksPerLine] << " ";
583 
584  }
585 
586  myCout << "\n" << std::endl;
587 
588  myCout << " LocalBxNr: "
589  << std::hex << " hex: " << " " << std::setw(3) << std::setfill('0') << m_localBxNr
590  << std::setfill(' ')
591  << std::dec << " dec: " << m_localBxNr
592  << std::endl;
593 
594 }
int i
Definition: DBlmapReader.cc:9
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
static const int DataCHSize
Definition: L1GtPsbWord.h:242
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
void L1GtPsbWord::reset ( void  )

reset the content of a L1GtPsbWord

Definition at line 432 of file L1GtPsbWord.cc.

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

Referenced by L1GlobalTriggerRawToDigi::produce().

433 {
434 
435  m_boardId = 0;
436  m_bxInEvent = 0;
437  m_bxNr = 0;
438  m_eventNr = 0;
439 
440  for (int iA = 0; iA < NumberAData; ++iA) {
441  m_aData[iA] = 0;
442  }
443 
444  for (int iB = 0; iB < NumberBData; ++iB) {
445  m_bData[iB] = 0;
446  }
447 
448  m_localBxNr = 0;
449 
450 }
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
static const int NumberBData
Definition: L1GtPsbWord.h:35
static const int NumberAData
Definition: L1GtPsbWord.h:34
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
void L1GtPsbWord::setAData ( cms_uint16_t  aDataVal,
int  iA 
)

Definition at line 242 of file L1GtPsbWord.cc.

References edm::hlt::Exception, m_aData, and NumberAData.

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

243 {
244 
245  if (iA < 0 || iA > NumberAData) {
246  throw cms::Exception("aDataIndexError")
247  << "\nError: index for A_DATA array out of range. Allowed range: [0, "
248  << NumberAData << ") " << std::endl;
249 
250  } else {
251  m_aData[iA] = aDataVal;
252  }
253 
254 }
static const int NumberAData
Definition: L1GtPsbWord.h:34
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
void L1GtPsbWord::setAData ( const cms_uint64_t word64,
int  iWord 
)

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

Definition at line 258 of file L1GtPsbWord.cc.

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

259 {
260 
261  int sizeW64 = sizeof(word64)*8;
262  int nSubWords = sizeW64/DataCHSize;
263 
264  if (iWord == ADataCH0Word) {
265 
266  for (int i = 0; i < nSubWords; ++i) {
267  int dataShift = i*DataCHSize;
268  m_aData[i] = (word64 & (DataCHMask << dataShift)) >> dataShift;
269 
270  // LogTrace("L1GtPsbWord")
271  // << "\n A_Data_CH" << i << " = "
272  // << m_aData[i]
273  // << std::endl;
274 
275  }
276 
277  } else if (iWord == ADataCH4Word) {
278 
279  for (int i = 0; i < nSubWords; ++i) {
280  int dataShift = i*DataCHSize;
281  m_aData[i + nSubWords] = (word64 & (DataCHMask << dataShift)) >> dataShift;
282 
283  // LogTrace("L1GtPsbWord")
284  // << "\n A_Data_CH" << i + nSubWords << " = "
285  // << m_aData[i]
286  // << std::endl;
287  }
288 
289  }
290 
291 }
int i
Definition: DBlmapReader.cc:9
static const int DataCHSize
Definition: L1GtPsbWord.h:242
static const int ADataCH0Word
Definition: L1GtPsbWord.h:246
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
static const int ADataCH4Word
Definition: L1GtPsbWord.h:249
void L1GtPsbWord::setADataWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 295 of file L1GtPsbWord.cc.

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

Referenced by L1GTDigiToRaw::packPSB().

296 {
297 
298  int sizeW64 = sizeof(word64)*8;
299  int nSubWords = sizeW64/DataCHSize;
300 
301  if (iWord == ADataCH0Word) {
302 
303  for (int i = 0; i < nSubWords; ++i) {
304  int dataShift = i*DataCHSize;
305  word64 = word64 | (static_cast<cms_uint64_t> (m_aData[i]) << dataShift);
306  }
307 
308  }
309  else if (iWord == ADataCH4Word) {
310 
311  for (int i = 0; i < nSubWords; ++i) {
312  int dataShift = i*DataCHSize;
313  word64 = word64 |
314  (static_cast<cms_uint64_t> (m_aData[i + nSubWords]) << dataShift);
315  }
316 
317  }
318 
319 }
int i
Definition: DBlmapReader.cc:9
static const int DataCHSize
Definition: L1GtPsbWord.h:242
static const int ADataCH0Word
Definition: L1GtPsbWord.h:246
unsigned long long cms_uint64_t
Definition: typedefs.h:17
cms_uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:279
static const int ADataCH4Word
Definition: L1GtPsbWord.h:249
void L1GtPsbWord::setBData ( cms_uint16_t  bDataVal,
int  iB 
)

Definition at line 337 of file L1GtPsbWord.cc.

References edm::hlt::Exception, m_bData, and NumberBData.

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

338 {
339 
340  if (iB < 0 || iB > NumberBData) {
341  throw cms::Exception("bDataIndexError")
342  << "\nError: index for B_DATA array out of range. Allowed range: [0, "
343  << NumberBData << ") " << std::endl;
344 
345  } else {
346  m_bData[iB] = bDataVal;
347  }
348 
349 }
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
static const int NumberBData
Definition: L1GtPsbWord.h:35
void L1GtPsbWord::setBData ( const cms_uint64_t word64,
int  iWord 
)

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

Definition at line 353 of file L1GtPsbWord.cc.

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

354 {
355 
356  int sizeW64 = sizeof(word64)*8;
357  int nSubWords = sizeW64/DataCHSize;
358 
359  if (iWord == BDataCH0Word) {
360 
361  for (int i = 0; i < nSubWords; ++i) {
362  int dataShift = i*DataCHSize;
363  m_bData[i] = (word64 & (DataCHMask << dataShift)) >> dataShift;
364  }
365 
366  } else if (iWord == BDataCH4Word) {
367 
368  for (int i = 0; i < nSubWords; ++i) {
369  int dataShift = i*DataCHSize;
370  m_bData[i + nSubWords] = (word64 & (DataCHMask << dataShift)) >> dataShift;
371  }
372 
373  }
374 
375 }
int i
Definition: DBlmapReader.cc:9
static const int BDataCH0Word
Definition: L1GtPsbWord.h:252
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
static const int DataCHSize
Definition: L1GtPsbWord.h:242
static const int BDataCH4Word
Definition: L1GtPsbWord.h:255
void L1GtPsbWord::setBDataWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 379 of file L1GtPsbWord.cc.

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

Referenced by L1GTDigiToRaw::packPSB().

380 {
381 
382  int sizeW64 = sizeof(word64)*8;
383  int nSubWords = sizeW64/DataCHSize;
384 
385  if (iWord == BDataCH0Word) {
386 
387  for (int i = 0; i < nSubWords; ++i) {
388  int dataShift = i*DataCHSize;
389  word64 = word64 | (static_cast<cms_uint64_t> (m_bData[i]) << dataShift);
390  }
391 
392  }
393  else if (iWord == BDataCH4Word) {
394 
395  for (int i = 0; i < nSubWords; ++i) {
396  int dataShift = i*DataCHSize;
397  word64 = word64 |
398  (static_cast<cms_uint64_t> (m_bData[i + nSubWords]) << dataShift);
399  }
400 
401  }
402 
403 }
int i
Definition: DBlmapReader.cc:9
static const int BDataCH0Word
Definition: L1GtPsbWord.h:252
cms_uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:281
static const int DataCHSize
Definition: L1GtPsbWord.h:242
static const int BDataCH4Word
Definition: L1GtPsbWord.h:255
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void L1GtPsbWord::setBoardId ( cms_uint16_t  boardIdValue)
inline

Definition at line 71 of file L1GtPsbWord.h.

References m_boardId.

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

72  {
73  m_boardId = boardIdValue;
74  }
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
void L1GtPsbWord::setBoardId ( const cms_uint64_t word64,
int  iWord 
)

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

Definition at line 136 of file L1GtPsbWord.cc.

References BoardIdMask, BoardIdShift, BoardIdWord, and m_boardId.

137 {
138  if (iWord == BoardIdWord) {
139  m_boardId = (word64 & BoardIdMask) >> BoardIdShift;
140  }
141 
142 }
static const int BoardIdShift
Definition: L1GtPsbWord.h:236
static const cms_uint64_t BoardIdMask
Definition: L1GtPsbWord.h:230
static const int BoardIdWord
Definition: L1GtPsbWord.h:224
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
void L1GtPsbWord::setBoardIdWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 146 of file L1GtPsbWord.cc.

References BoardIdShift, BoardIdWord, and m_boardId.

Referenced by L1GTDigiToRaw::packPSB().

147 {
148 
149  if (iWord == BoardIdWord) {
150  word64 = word64 | (static_cast<cms_uint64_t> (m_boardId) << BoardIdShift);
151  }
152 
153 }
static const int BoardIdShift
Definition: L1GtPsbWord.h:236
static const int BoardIdWord
Definition: L1GtPsbWord.h:224
unsigned long long cms_uint64_t
Definition: typedefs.h:17
cms_uint16_t m_boardId
Definition: L1GtPsbWord.h:270
void L1GtPsbWord::setBxInEvent ( int  bxInEventValue)
inline

Definition at line 92 of file L1GtPsbWord.h.

References m_bxInEvent.

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

93  {
94  m_bxInEvent = bxInEventValue;
95  }
void L1GtPsbWord::setBxInEvent ( const cms_uint64_t word64,
int  iWord 
)

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

Definition at line 158 of file L1GtPsbWord.cc.

References BxInEventMask, BxInEventShift, BxInEventWord, and m_bxInEvent.

159 {
160  if (iWord == BxInEventWord) {
161  int baseValue = 16; // using hexadecimal values;
162  int hexBxInEvent = (word64 & BxInEventMask) >> BxInEventShift;
163  m_bxInEvent = (hexBxInEvent + baseValue/2)%baseValue - baseValue/2;
164  }
165 
166 }
static const cms_uint64_t BxInEventMask
Definition: L1GtPsbWord.h:231
static const int BxInEventShift
Definition: L1GtPsbWord.h:237
static const int BxInEventWord
Definition: L1GtPsbWord.h:225
void L1GtPsbWord::setBxInEventWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 170 of file L1GtPsbWord.cc.

References BxInEventShift, BxInEventWord, and m_bxInEvent.

Referenced by L1GTDigiToRaw::packPSB().

171 {
172 
173  if (iWord == BxInEventWord) {
174  int baseValue = 16; // using hexadecimal values;
175  int hexBxInEvent = (m_bxInEvent + baseValue)%baseValue;
176  word64 = word64 | (static_cast<cms_uint64_t> (hexBxInEvent)
177  << BxInEventShift);
178  }
179 
180 }
static const int BxInEventShift
Definition: L1GtPsbWord.h:237
static const int BxInEventWord
Definition: L1GtPsbWord.h:225
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void L1GtPsbWord::setBxNr ( cms_uint16_t  bxNrValue)
inline

Definition at line 113 of file L1GtPsbWord.h.

References m_bxNr.

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

114  {
115  m_bxNr = bxNrValue;
116  }
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
void L1GtPsbWord::setBxNr ( const cms_uint64_t word64,
int  iWord 
)

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

Definition at line 184 of file L1GtPsbWord.cc.

References BxNrMask, BxNrShift, BxNrWord, and m_bxNr.

185 {
186 
187  if (iWord == BxNrWord) {
188  m_bxNr = (word64 & BxNrMask) >> BxNrShift;
189  }
190 
191 }
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
static const int BxNrWord
Definition: L1GtPsbWord.h:226
static const cms_uint64_t BxNrMask
Definition: L1GtPsbWord.h:232
static const int BxNrShift
Definition: L1GtPsbWord.h:238
void L1GtPsbWord::setBxNrWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 195 of file L1GtPsbWord.cc.

References BxNrShift, BxNrWord, and m_bxNr.

Referenced by L1GTDigiToRaw::packPSB().

196 {
197 
198  if (iWord == BxNrWord) {
199  word64 = word64 | (static_cast<cms_uint64_t> (m_bxNr) << BxNrShift);
200  }
201 
202 }
cms_uint16_t m_bxNr
Definition: L1GtPsbWord.h:276
static const int BxNrWord
Definition: L1GtPsbWord.h:226
unsigned long long cms_uint64_t
Definition: typedefs.h:17
static const int BxNrShift
Definition: L1GtPsbWord.h:238
void L1GtPsbWord::setEventNr ( cms_uint32_t  eventNrValue)
inline

Definition at line 134 of file L1GtPsbWord.h.

References m_eventNr.

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

135  {
136  m_eventNr = eventNrValue;
137  }
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
void L1GtPsbWord::setEventNr ( const cms_uint64_t word64,
int  iWord 
)

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

Definition at line 206 of file L1GtPsbWord.cc.

References EventNrMask, EventNrShift, EventNrWord, and m_eventNr.

207 {
208  if (iWord == EventNrWord) {
209  m_eventNr = (word64 & EventNrMask) >> EventNrShift;
210  }
211 
212 }
static const int EventNrWord
Definition: L1GtPsbWord.h:227
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
static const cms_uint64_t EventNrMask
Definition: L1GtPsbWord.h:233
static const int EventNrShift
Definition: L1GtPsbWord.h:239
void L1GtPsbWord::setEventNrWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 216 of file L1GtPsbWord.cc.

References EventNrShift, EventNrWord, and m_eventNr.

Referenced by L1GTDigiToRaw::packPSB().

217 {
218 
219  if (iWord == EventNrWord) {
220  word64 = word64 | (static_cast<cms_uint64_t> (m_eventNr) << EventNrShift);
221  }
222 
223 }
static const int EventNrWord
Definition: L1GtPsbWord.h:227
cms_uint32_t m_eventNr
Definition: L1GtPsbWord.h:277
static const int EventNrShift
Definition: L1GtPsbWord.h:239
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void L1GtPsbWord::setLocalBxNr ( cms_uint16_t  localBxNrValue)
inline

Definition at line 183 of file L1GtPsbWord.h.

References m_localBxNr.

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

184  {
185  m_localBxNr = localBxNrValue;
186  }
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
void L1GtPsbWord::setLocalBxNr ( const cms_uint64_t word64,
int  iWord 
)

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

Definition at line 408 of file L1GtPsbWord.cc.

References LocalBxNrMask, LocalBxNrShift, LocalBxNrWord, and m_localBxNr.

409 {
410  if (iWord == LocalBxNrWord) {
411  m_localBxNr = (word64 & LocalBxNrMask) >> LocalBxNrShift;
412  }
413 
414 }
static const int LocalBxNrWord
Definition: L1GtPsbWord.h:258
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
static const cms_uint64_t LocalBxNrMask
Definition: L1GtPsbWord.h:259
static const int LocalBxNrShift
Definition: L1GtPsbWord.h:260
void L1GtPsbWord::setLocalBxNrWord64 ( cms_uint64_t word64,
int  iWord 
)

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

Definition at line 418 of file L1GtPsbWord.cc.

References LocalBxNrShift, LocalBxNrWord, and m_localBxNr.

Referenced by L1GTDigiToRaw::packPSB().

419 {
420 
421  if (iWord == LocalBxNrWord) {
422  word64 = word64 | (static_cast<cms_uint64_t> (m_localBxNr)
423  << LocalBxNrShift);
424  }
425 
426 }
static const int LocalBxNrWord
Definition: L1GtPsbWord.h:258
cms_uint16_t m_localBxNr
Definition: L1GtPsbWord.h:283
static const int LocalBxNrShift
Definition: L1GtPsbWord.h:260
unsigned long long cms_uint64_t
Definition: typedefs.h:17

Member Data Documentation

const int L1GtPsbWord::ADataCH0Word = 1
staticprivate

Definition at line 246 of file L1GtPsbWord.h.

Referenced by setAData(), and setADataWord64().

const int L1GtPsbWord::ADataCH4Word = 2
staticprivate

Definition at line 249 of file L1GtPsbWord.h.

Referenced by setAData(), and setADataWord64().

const int L1GtPsbWord::BDataCH0Word = 3
staticprivate

Definition at line 252 of file L1GtPsbWord.h.

Referenced by setBData(), and setBDataWord64().

const int L1GtPsbWord::BDataCH4Word = 4
staticprivate

Definition at line 255 of file L1GtPsbWord.h.

Referenced by setBData(), and setBDataWord64().

const int L1GtPsbWord::BlockSize = 6
staticprivate

Definition at line 219 of file L1GtPsbWord.h.

Referenced by getSize().

const cms_uint64_t L1GtPsbWord::BoardIdMask = 0xFFFF000000000000ULL
staticprivate

Definition at line 230 of file L1GtPsbWord.h.

Referenced by setBoardId().

const int L1GtPsbWord::BoardIdShift = 48
staticprivate

Definition at line 236 of file L1GtPsbWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

const int L1GtPsbWord::BoardIdWord = 0
staticprivate

Definition at line 224 of file L1GtPsbWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

const cms_uint64_t L1GtPsbWord::BxInEventMask = 0x0000F00000000000ULL
staticprivate

Definition at line 231 of file L1GtPsbWord.h.

Referenced by setBxInEvent().

const int L1GtPsbWord::BxInEventShift = 44
staticprivate

Definition at line 237 of file L1GtPsbWord.h.

Referenced by setBxInEvent(), and setBxInEventWord64().

const int L1GtPsbWord::BxInEventWord = 0
staticprivate

Definition at line 225 of file L1GtPsbWord.h.

Referenced by setBxInEvent(), and setBxInEventWord64().

const cms_uint64_t L1GtPsbWord::BxNrMask = 0x00000FFF00000000ULL
staticprivate

Definition at line 232 of file L1GtPsbWord.h.

Referenced by setBxNr().

const int L1GtPsbWord::BxNrShift = 32
staticprivate

Definition at line 238 of file L1GtPsbWord.h.

Referenced by setBxNr(), and setBxNrWord64().

const int L1GtPsbWord::BxNrWord = 0
staticprivate

Definition at line 226 of file L1GtPsbWord.h.

Referenced by setBxNr(), and setBxNrWord64().

const cms_uint64_t L1GtPsbWord::DataCHMask = 0x000000000000FFFFULL
staticprivate

Definition at line 243 of file L1GtPsbWord.h.

const int L1GtPsbWord::DataCHSize = 16
staticprivate

Definition at line 242 of file L1GtPsbWord.h.

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

const cms_uint64_t L1GtPsbWord::EventNrMask = 0x0000000000FFFFFFULL
staticprivate

Definition at line 233 of file L1GtPsbWord.h.

Referenced by setEventNr().

const int L1GtPsbWord::EventNrShift = 0
staticprivate

Definition at line 239 of file L1GtPsbWord.h.

Referenced by setEventNr(), and setEventNrWord64().

const int L1GtPsbWord::EventNrWord = 0
staticprivate

Definition at line 227 of file L1GtPsbWord.h.

Referenced by setEventNr(), and setEventNrWord64().

const cms_uint64_t L1GtPsbWord::LocalBxNrMask = 0x0000000000000FFFULL
staticprivate

Definition at line 259 of file L1GtPsbWord.h.

Referenced by setLocalBxNr().

const int L1GtPsbWord::LocalBxNrShift = 0
staticprivate

Definition at line 260 of file L1GtPsbWord.h.

Referenced by setLocalBxNr(), and setLocalBxNrWord64().

const int L1GtPsbWord::LocalBxNrWord = 5
staticprivate

Definition at line 258 of file L1GtPsbWord.h.

Referenced by setLocalBxNr(), and setLocalBxNrWord64().

cms_uint16_t L1GtPsbWord::m_aData[NumberAData]
private

Definition at line 279 of file L1GtPsbWord.h.

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

cms_uint16_t L1GtPsbWord::m_bData[NumberBData]
private

Definition at line 281 of file L1GtPsbWord.h.

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

cms_uint16_t L1GtPsbWord::m_boardId
private

Definition at line 270 of file L1GtPsbWord.h.

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

int L1GtPsbWord::m_bxInEvent
private
cms_uint16_t L1GtPsbWord::m_bxNr
private

Definition at line 276 of file L1GtPsbWord.h.

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

cms_uint32_t L1GtPsbWord::m_eventNr
private

Definition at line 277 of file L1GtPsbWord.h.

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

cms_uint16_t L1GtPsbWord::m_localBxNr
private
const int L1GtPsbWord::NumberAData = 8
static
const int L1GtPsbWord::NumberBData = 8
static