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 boost::uint16_t aData (int iA) const
 get/set A_DATA_CH_IA More...
 
const boost::uint16_t bData (int iB) const
 get/set B_DATA_CH_IB More...
 
const boost::uint16_t boardId () const
 get/set board ID More...
 
const int bxInEvent () const
 get/set bunch cross in the GT event record More...
 
const boost::uint16_t bxNr () const
 get/set bunch cross number of the actual bx More...
 
const boost::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 (boost::uint16_t boardIdValue, int bxInEventValue, boost::uint16_t bxNrValue, boost::uint32_t eventNrValue, boost::uint16_t aDataValue[NumberAData], boost::uint16_t bDataValue[NumberBData], boost::uint16_t localBxNrValue)
 constructor from unpacked values; More...
 
const boost::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 (boost::uint16_t aDataVal, int iA)
 
void setAData (const boost::uint64_t &word64, int iWord)
 
void setADataWord64 (boost::uint64_t &word64, int iWord)
 
void setBData (boost::uint16_t bDataVal, int iB)
 
void setBData (const boost::uint64_t &word64, int iWord)
 
void setBDataWord64 (boost::uint64_t &word64, int iWord)
 
void setBoardId (boost::uint16_t boardIdValue)
 
void setBoardId (const boost::uint64_t &word64, int iWord)
 
void setBoardIdWord64 (boost::uint64_t &word64, int iWord)
 
void setBxInEvent (int bxInEventValue)
 
void setBxInEvent (const boost::uint64_t &word64, int iWord)
 
void setBxInEventWord64 (boost::uint64_t &word64, int iWord)
 
void setBxNr (boost::uint16_t bxNrValue)
 
void setBxNr (const boost::uint64_t &word64, int iWord)
 
void setBxNrWord64 (boost::uint64_t &word64, int iWord)
 
void setEventNr (boost::uint32_t eventNrValue)
 
void setEventNr (const boost::uint64_t &word64, int iWord)
 
void setEventNrWord64 (boost::uint64_t &word64, int iWord)
 
void setLocalBxNr (boost::uint16_t localBxNrValue)
 
void setLocalBxNr (const boost::uint64_t &word64, int iWord)
 
void setLocalBxNrWord64 (boost::uint64_t &word64, int iWord)
 
virtual ~L1GtPsbWord ()
 destructor More...
 

Static Public Attributes

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

Private Attributes

boost::uint16_t m_aData [NumberAData]
 
boost::uint16_t m_bData [NumberBData]
 
boost::uint16_t m_boardId
 
int m_bxInEvent
 
boost::uint16_t m_bxNr
 
boost::uint32_t m_eventNr
 
boost::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 boost::uint64_t BoardIdMask = 0xFFFF000000000000ULL
 
static const int BoardIdShift = 48
 
static const int BoardIdWord = 0
 
static const boost::uint64_t BxInEventMask = 0x0000F00000000000ULL
 
static const int BxInEventShift = 44
 
static const int BxInEventWord = 0
 
static const boost::uint64_t BxNrMask = 0x00000FFF00000000ULL
 
static const int BxNrShift = 32
 
static const int BxNrWord = 0
 
static const boost::uint64_t DataCHMask = 0x000000000000FFFFULL
 
static const int DataCHSize = 16
 
static const boost::uint64_t EventNrMask = 0x0000000000FFFFFFULL
 
static const int EventNrShift = 0
 
static const int EventNrWord = 0
 
static const boost::uint64_t LocalBxNrMask = 0x0000000000000FFFULL
 
static const int LocalBxNrShift = 0
 
static const int LocalBxNrWord = 5
 

Detailed Description

Description: PSB block in the L1 GT readout record.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 31 of file L1GtPsbWord.h.

Constructor & Destructor Documentation

L1GtPsbWord::L1GtPsbWord ( )

constructors

Definition at line 30 of file L1GtPsbWord.cc.

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

31 {
32 
33  m_boardId = 0;
34  m_bxInEvent = 0;
35  m_bxNr = 0;
36  m_eventNr = 0;
37 
38  for (int iA = 0; iA < NumberAData; ++iA) {
39  m_aData[iA] = 0;
40  }
41 
42  for (int iB = 0; iB < NumberBData; ++iB) {
43  m_bData[iB] = 0;
44  }
45 
46  m_localBxNr = 0;
47 
48 }
boost::uint16_t m_bxNr
Definition: L1GtPsbWord.h:278
boost::uint32_t m_eventNr
Definition: L1GtPsbWord.h:279
boost::uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:281
boost::uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:283
boost::uint16_t m_boardId
Definition: L1GtPsbWord.h:272
static const int NumberBData
Definition: L1GtPsbWord.h:37
static const int NumberAData
Definition: L1GtPsbWord.h:36
boost::uint16_t m_localBxNr
Definition: L1GtPsbWord.h:285
L1GtPsbWord::L1GtPsbWord ( boost::uint16_t  boardIdValue,
int  bxInEventValue,
boost::uint16_t  bxNrValue,
boost::uint32_t  eventNrValue,
boost::uint16_t  aDataValue[NumberAData],
boost::uint16_t  bDataValue[NumberBData],
boost::uint16_t  localBxNrValue 
)

constructor from unpacked values;

Definition at line 51 of file L1GtPsbWord.cc.

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

60 {
61 
62  m_boardId = boardIdValue;
63  m_bxInEvent = bxInEventValue;
64  m_bxNr = bxNrValue;
65  m_eventNr = eventNrValue;
66 
67  for (int iA = 0; iA < NumberAData; ++iA) {
68  m_aData[iA] = aDataValue[iA];
69  }
70 
71  for (int iB = 0; iB < NumberBData; ++iB) {
72  m_bData[iB] = bDataValue[iB];
73  }
74 
75  m_localBxNr = localBxNrValue;
76 
77 }
boost::uint16_t m_bxNr
Definition: L1GtPsbWord.h:278
boost::uint32_t m_eventNr
Definition: L1GtPsbWord.h:279
boost::uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:281
boost::uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:283
boost::uint16_t m_boardId
Definition: L1GtPsbWord.h:272
static const int NumberBData
Definition: L1GtPsbWord.h:37
static const int NumberAData
Definition: L1GtPsbWord.h:36
boost::uint16_t m_localBxNr
Definition: L1GtPsbWord.h:285
L1GtPsbWord::~L1GtPsbWord ( )
virtual

destructor

Definition at line 80 of file L1GtPsbWord.cc.

81 {
82 
83  // empty now
84 
85 }

Member Function Documentation

const boost::uint16_t L1GtPsbWord::aData ( int  iA) const

get/set A_DATA_CH_IA

Definition at line 230 of file L1GtPsbWord.cc.

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

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

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

get/set B_DATA_CH_IB

Definition at line 325 of file L1GtPsbWord.cc.

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

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

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

get/set bunch cross in the GT event record

Definition at line 89 of file L1GtPsbWord.h.

References m_bxInEvent.

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

90  {
91  return m_bxInEvent;
92  }
const boost::uint16_t L1GtPsbWord::bxNr ( ) const
inline

get/set bunch cross number of the actual bx

Definition at line 110 of file L1GtPsbWord.h.

References m_bxNr.

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

111  {
112  return m_bxNr;
113  }
boost::uint16_t m_bxNr
Definition: L1GtPsbWord.h:278
const boost::uint32_t L1GtPsbWord::eventNr ( ) const
inline

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

Definition at line 131 of file L1GtPsbWord.h.

References m_eventNr.

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

132  {
133  return m_eventNr;
134  }
boost::uint32_t m_eventNr
Definition: L1GtPsbWord.h:279
const unsigned int L1GtPsbWord::getSize ( ) const
inline

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

Definition at line 200 of file L1GtPsbWord.h.

References BlockSize, and L1GlobalTriggerReadoutSetup::UnitLength.

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

201  {
202  int unitLengthBits = L1GlobalTriggerReadoutSetup::UnitLength;
203 
204  return BlockSize*unitLengthBits;
205  }
static const int BlockSize
Definition: L1GtPsbWord.h:221
static const int UnitLength
one unit in the word is UnitLength bits
const boost::uint16_t L1GtPsbWord::localBxNr ( ) const
inline

get/set local bunch cross number of the actual bx

Definition at line 180 of file L1GtPsbWord.h.

References m_localBxNr.

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

181  {
182  return m_localBxNr;
183  }
boost::uint16_t m_localBxNr
Definition: L1GtPsbWord.h:285
bool L1GtPsbWord::operator!= ( const L1GtPsbWord result) const

unequal operator

Definition at line 126 of file L1GtPsbWord.cc.

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

equal operator

Definition at line 88 of file L1GtPsbWord.cc.

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

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

pretty print

Definition at line 455 of file L1GtPsbWord.cc.

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

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

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

reset the content of a L1GtPsbWord

Definition at line 434 of file L1GtPsbWord.cc.

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

Referenced by BeautifulSoup.BeautifulStoneSoup::__init__(), and L1GlobalTriggerRawToDigi::produce().

435 {
436 
437  m_boardId = 0;
438  m_bxInEvent = 0;
439  m_bxNr = 0;
440  m_eventNr = 0;
441 
442  for (int iA = 0; iA < NumberAData; ++iA) {
443  m_aData[iA] = 0;
444  }
445 
446  for (int iB = 0; iB < NumberBData; ++iB) {
447  m_bData[iB] = 0;
448  }
449 
450  m_localBxNr = 0;
451 
452 }
boost::uint16_t m_bxNr
Definition: L1GtPsbWord.h:278
boost::uint32_t m_eventNr
Definition: L1GtPsbWord.h:279
boost::uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:281
boost::uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:283
boost::uint16_t m_boardId
Definition: L1GtPsbWord.h:272
static const int NumberBData
Definition: L1GtPsbWord.h:37
static const int NumberAData
Definition: L1GtPsbWord.h:36
boost::uint16_t m_localBxNr
Definition: L1GtPsbWord.h:285
void L1GtPsbWord::setAData ( boost::uint16_t  aDataVal,
int  iA 
)

Definition at line 244 of file L1GtPsbWord.cc.

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

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

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

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

Definition at line 260 of file L1GtPsbWord.cc.

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

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

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

Definition at line 297 of file L1GtPsbWord.cc.

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

Referenced by L1GTDigiToRaw::packPSB().

298 {
299 
300  int sizeW64 = sizeof(word64)*8;
301  int nSubWords = sizeW64/DataCHSize;
302 
303  if (iWord == ADataCH0Word) {
304 
305  for (int i = 0; i < nSubWords; ++i) {
306  int dataShift = i*DataCHSize;
307  word64 = word64 | (static_cast<boost::uint64_t> (m_aData[i]) << dataShift);
308  }
309 
310  }
311  else if (iWord == ADataCH4Word) {
312 
313  for (int i = 0; i < nSubWords; ++i) {
314  int dataShift = i*DataCHSize;
315  word64 = word64 |
316  (static_cast<boost::uint64_t> (m_aData[i + nSubWords]) << dataShift);
317  }
318 
319  }
320 
321 }
int i
Definition: DBlmapReader.cc:9
static const int DataCHSize
Definition: L1GtPsbWord.h:244
boost::uint16_t m_aData[NumberAData]
Definition: L1GtPsbWord.h:281
unsigned long long uint64_t
Definition: Time.h:15
static const int ADataCH0Word
Definition: L1GtPsbWord.h:248
static const int ADataCH4Word
Definition: L1GtPsbWord.h:251
void L1GtPsbWord::setBData ( boost::uint16_t  bDataVal,
int  iB 
)

Definition at line 339 of file L1GtPsbWord.cc.

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

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

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

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

Definition at line 355 of file L1GtPsbWord.cc.

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

356 {
357 
358  int sizeW64 = sizeof(word64)*8;
359  int nSubWords = sizeW64/DataCHSize;
360 
361  if (iWord == BDataCH0Word) {
362 
363  for (int i = 0; i < nSubWords; ++i) {
364  int dataShift = i*DataCHSize;
365  m_bData[i] = (word64 & (DataCHMask << dataShift)) >> dataShift;
366  }
367 
368  } else if (iWord == BDataCH4Word) {
369 
370  for (int i = 0; i < nSubWords; ++i) {
371  int dataShift = i*DataCHSize;
372  m_bData[i + nSubWords] = (word64 & (DataCHMask << dataShift)) >> dataShift;
373  }
374 
375  }
376 
377 }
int i
Definition: DBlmapReader.cc:9
static const int BDataCH0Word
Definition: L1GtPsbWord.h:254
static const int DataCHSize
Definition: L1GtPsbWord.h:244
boost::uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:283
static const int BDataCH4Word
Definition: L1GtPsbWord.h:257
void L1GtPsbWord::setBDataWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 381 of file L1GtPsbWord.cc.

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

Referenced by L1GTDigiToRaw::packPSB().

382 {
383 
384  int sizeW64 = sizeof(word64)*8;
385  int nSubWords = sizeW64/DataCHSize;
386 
387  if (iWord == BDataCH0Word) {
388 
389  for (int i = 0; i < nSubWords; ++i) {
390  int dataShift = i*DataCHSize;
391  word64 = word64 | (static_cast<boost::uint64_t> (m_bData[i]) << dataShift);
392  }
393 
394  }
395  else if (iWord == BDataCH4Word) {
396 
397  for (int i = 0; i < nSubWords; ++i) {
398  int dataShift = i*DataCHSize;
399  word64 = word64 |
400  (static_cast<boost::uint64_t> (m_bData[i + nSubWords]) << dataShift);
401  }
402 
403  }
404 
405 }
int i
Definition: DBlmapReader.cc:9
static const int BDataCH0Word
Definition: L1GtPsbWord.h:254
static const int DataCHSize
Definition: L1GtPsbWord.h:244
boost::uint16_t m_bData[NumberBData]
Definition: L1GtPsbWord.h:283
unsigned long long uint64_t
Definition: Time.h:15
static const int BDataCH4Word
Definition: L1GtPsbWord.h:257
void L1GtPsbWord::setBoardId ( boost::uint16_t  boardIdValue)
inline

Definition at line 73 of file L1GtPsbWord.h.

References m_boardId.

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

74  {
75  m_boardId = boardIdValue;
76  }
boost::uint16_t m_boardId
Definition: L1GtPsbWord.h:272
void L1GtPsbWord::setBoardId ( const boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 138 of file L1GtPsbWord.cc.

References BoardIdMask, BoardIdShift, BoardIdWord, and m_boardId.

139 {
140  if (iWord == BoardIdWord) {
141  m_boardId = (word64 & BoardIdMask) >> BoardIdShift;
142  }
143 
144 }
static const int BoardIdShift
Definition: L1GtPsbWord.h:238
static const boost::uint64_t BoardIdMask
Definition: L1GtPsbWord.h:232
static const int BoardIdWord
Definition: L1GtPsbWord.h:226
boost::uint16_t m_boardId
Definition: L1GtPsbWord.h:272
void L1GtPsbWord::setBoardIdWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 148 of file L1GtPsbWord.cc.

References BoardIdShift, BoardIdWord, and m_boardId.

Referenced by L1GTDigiToRaw::packPSB().

149 {
150 
151  if (iWord == BoardIdWord) {
152  word64 = word64 | (static_cast<boost::uint64_t> (m_boardId) << BoardIdShift);
153  }
154 
155 }
static const int BoardIdShift
Definition: L1GtPsbWord.h:238
static const int BoardIdWord
Definition: L1GtPsbWord.h:226
boost::uint16_t m_boardId
Definition: L1GtPsbWord.h:272
unsigned long long uint64_t
Definition: Time.h:15
void L1GtPsbWord::setBxInEvent ( int  bxInEventValue)
inline

Definition at line 94 of file L1GtPsbWord.h.

References m_bxInEvent.

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

95  {
96  m_bxInEvent = bxInEventValue;
97  }
void L1GtPsbWord::setBxInEvent ( const boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 160 of file L1GtPsbWord.cc.

References BxInEventMask, BxInEventShift, BxInEventWord, and m_bxInEvent.

161 {
162  if (iWord == BxInEventWord) {
163  int baseValue = 16; // using hexadecimal values;
164  int hexBxInEvent = (word64 & BxInEventMask) >> BxInEventShift;
165  m_bxInEvent = (hexBxInEvent + baseValue/2)%baseValue - baseValue/2;
166  }
167 
168 }
static const boost::uint64_t BxInEventMask
Definition: L1GtPsbWord.h:233
static const int BxInEventShift
Definition: L1GtPsbWord.h:239
static const int BxInEventWord
Definition: L1GtPsbWord.h:227
void L1GtPsbWord::setBxInEventWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 172 of file L1GtPsbWord.cc.

References BxInEventShift, BxInEventWord, and m_bxInEvent.

Referenced by L1GTDigiToRaw::packPSB().

173 {
174 
175  if (iWord == BxInEventWord) {
176  int baseValue = 16; // using hexadecimal values;
177  int hexBxInEvent = (m_bxInEvent + baseValue)%baseValue;
178  word64 = word64 | (static_cast<boost::uint64_t> (hexBxInEvent)
179  << BxInEventShift);
180  }
181 
182 }
static const int BxInEventShift
Definition: L1GtPsbWord.h:239
static const int BxInEventWord
Definition: L1GtPsbWord.h:227
unsigned long long uint64_t
Definition: Time.h:15
void L1GtPsbWord::setBxNr ( boost::uint16_t  bxNrValue)
inline

Definition at line 115 of file L1GtPsbWord.h.

References m_bxNr.

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

116  {
117  m_bxNr = bxNrValue;
118  }
boost::uint16_t m_bxNr
Definition: L1GtPsbWord.h:278
void L1GtPsbWord::setBxNr ( const boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 186 of file L1GtPsbWord.cc.

References BxNrMask, BxNrShift, BxNrWord, and m_bxNr.

187 {
188 
189  if (iWord == BxNrWord) {
190  m_bxNr = (word64 & BxNrMask) >> BxNrShift;
191  }
192 
193 }
boost::uint16_t m_bxNr
Definition: L1GtPsbWord.h:278
static const int BxNrWord
Definition: L1GtPsbWord.h:228
static const boost::uint64_t BxNrMask
Definition: L1GtPsbWord.h:234
static const int BxNrShift
Definition: L1GtPsbWord.h:240
void L1GtPsbWord::setBxNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 197 of file L1GtPsbWord.cc.

References BxNrShift, BxNrWord, and m_bxNr.

Referenced by L1GTDigiToRaw::packPSB().

198 {
199 
200  if (iWord == BxNrWord) {
201  word64 = word64 | (static_cast<boost::uint64_t> (m_bxNr) << BxNrShift);
202  }
203 
204 }
boost::uint16_t m_bxNr
Definition: L1GtPsbWord.h:278
unsigned long long uint64_t
Definition: Time.h:15
static const int BxNrWord
Definition: L1GtPsbWord.h:228
static const int BxNrShift
Definition: L1GtPsbWord.h:240
void L1GtPsbWord::setEventNr ( boost::uint32_t  eventNrValue)
inline

Definition at line 136 of file L1GtPsbWord.h.

References m_eventNr.

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

137  {
138  m_eventNr = eventNrValue;
139  }
boost::uint32_t m_eventNr
Definition: L1GtPsbWord.h:279
void L1GtPsbWord::setEventNr ( const boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 208 of file L1GtPsbWord.cc.

References EventNrMask, EventNrShift, EventNrWord, and m_eventNr.

209 {
210  if (iWord == EventNrWord) {
211  m_eventNr = (word64 & EventNrMask) >> EventNrShift;
212  }
213 
214 }
static const int EventNrWord
Definition: L1GtPsbWord.h:229
boost::uint32_t m_eventNr
Definition: L1GtPsbWord.h:279
static const int EventNrShift
Definition: L1GtPsbWord.h:241
static const boost::uint64_t EventNrMask
Definition: L1GtPsbWord.h:235
void L1GtPsbWord::setEventNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 218 of file L1GtPsbWord.cc.

References EventNrShift, EventNrWord, and m_eventNr.

Referenced by L1GTDigiToRaw::packPSB().

219 {
220 
221  if (iWord == EventNrWord) {
222  word64 = word64 | (static_cast<boost::uint64_t> (m_eventNr) << EventNrShift);
223  }
224 
225 }
static const int EventNrWord
Definition: L1GtPsbWord.h:229
boost::uint32_t m_eventNr
Definition: L1GtPsbWord.h:279
unsigned long long uint64_t
Definition: Time.h:15
static const int EventNrShift
Definition: L1GtPsbWord.h:241
void L1GtPsbWord::setLocalBxNr ( boost::uint16_t  localBxNrValue)
inline

Definition at line 185 of file L1GtPsbWord.h.

References m_localBxNr.

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

186  {
187  m_localBxNr = localBxNrValue;
188  }
boost::uint16_t m_localBxNr
Definition: L1GtPsbWord.h:285
void L1GtPsbWord::setLocalBxNr ( const boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 410 of file L1GtPsbWord.cc.

References LocalBxNrMask, LocalBxNrShift, LocalBxNrWord, and m_localBxNr.

411 {
412  if (iWord == LocalBxNrWord) {
413  m_localBxNr = (word64 & LocalBxNrMask) >> LocalBxNrShift;
414  }
415 
416 }
static const int LocalBxNrWord
Definition: L1GtPsbWord.h:260
static const boost::uint64_t LocalBxNrMask
Definition: L1GtPsbWord.h:261
static const int LocalBxNrShift
Definition: L1GtPsbWord.h:262
boost::uint16_t m_localBxNr
Definition: L1GtPsbWord.h:285
void L1GtPsbWord::setLocalBxNrWord64 ( boost::uint64_t &  word64,
int  iWord 
)

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

Definition at line 420 of file L1GtPsbWord.cc.

References LocalBxNrShift, LocalBxNrWord, and m_localBxNr.

Referenced by L1GTDigiToRaw::packPSB().

421 {
422 
423  if (iWord == LocalBxNrWord) {
424  word64 = word64 | (static_cast<boost::uint64_t> (m_localBxNr)
425  << LocalBxNrShift);
426  }
427 
428 }
static const int LocalBxNrWord
Definition: L1GtPsbWord.h:260
static const int LocalBxNrShift
Definition: L1GtPsbWord.h:262
unsigned long long uint64_t
Definition: Time.h:15
boost::uint16_t m_localBxNr
Definition: L1GtPsbWord.h:285

Member Data Documentation

const int L1GtPsbWord::ADataCH0Word = 1
staticprivate

Definition at line 248 of file L1GtPsbWord.h.

Referenced by setAData(), and setADataWord64().

const int L1GtPsbWord::ADataCH4Word = 2
staticprivate

Definition at line 251 of file L1GtPsbWord.h.

Referenced by setAData(), and setADataWord64().

const int L1GtPsbWord::BDataCH0Word = 3
staticprivate

Definition at line 254 of file L1GtPsbWord.h.

Referenced by setBData(), and setBDataWord64().

const int L1GtPsbWord::BDataCH4Word = 4
staticprivate

Definition at line 257 of file L1GtPsbWord.h.

Referenced by setBData(), and setBDataWord64().

const int L1GtPsbWord::BlockSize = 6
staticprivate

Definition at line 221 of file L1GtPsbWord.h.

Referenced by getSize().

const boost::uint64_t L1GtPsbWord::BoardIdMask = 0xFFFF000000000000ULL
staticprivate

Definition at line 232 of file L1GtPsbWord.h.

Referenced by setBoardId().

const int L1GtPsbWord::BoardIdShift = 48
staticprivate

Definition at line 238 of file L1GtPsbWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

const int L1GtPsbWord::BoardIdWord = 0
staticprivate

Definition at line 226 of file L1GtPsbWord.h.

Referenced by setBoardId(), and setBoardIdWord64().

const boost::uint64_t L1GtPsbWord::BxInEventMask = 0x0000F00000000000ULL
staticprivate

Definition at line 233 of file L1GtPsbWord.h.

Referenced by setBxInEvent().

const int L1GtPsbWord::BxInEventShift = 44
staticprivate

Definition at line 239 of file L1GtPsbWord.h.

Referenced by setBxInEvent(), and setBxInEventWord64().

const int L1GtPsbWord::BxInEventWord = 0
staticprivate

Definition at line 227 of file L1GtPsbWord.h.

Referenced by setBxInEvent(), and setBxInEventWord64().

const boost::uint64_t L1GtPsbWord::BxNrMask = 0x00000FFF00000000ULL
staticprivate

Definition at line 234 of file L1GtPsbWord.h.

Referenced by setBxNr().

const int L1GtPsbWord::BxNrShift = 32
staticprivate

Definition at line 240 of file L1GtPsbWord.h.

Referenced by setBxNr(), and setBxNrWord64().

const int L1GtPsbWord::BxNrWord = 0
staticprivate

Definition at line 228 of file L1GtPsbWord.h.

Referenced by setBxNr(), and setBxNrWord64().

const boost::uint64_t L1GtPsbWord::DataCHMask = 0x000000000000FFFFULL
staticprivate

Definition at line 245 of file L1GtPsbWord.h.

const int L1GtPsbWord::DataCHSize = 16
staticprivate

Definition at line 244 of file L1GtPsbWord.h.

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

const boost::uint64_t L1GtPsbWord::EventNrMask = 0x0000000000FFFFFFULL
staticprivate

Definition at line 235 of file L1GtPsbWord.h.

Referenced by setEventNr().

const int L1GtPsbWord::EventNrShift = 0
staticprivate

Definition at line 241 of file L1GtPsbWord.h.

Referenced by setEventNr(), and setEventNrWord64().

const int L1GtPsbWord::EventNrWord = 0
staticprivate

Definition at line 229 of file L1GtPsbWord.h.

Referenced by setEventNr(), and setEventNrWord64().

const boost::uint64_t L1GtPsbWord::LocalBxNrMask = 0x0000000000000FFFULL
staticprivate

Definition at line 261 of file L1GtPsbWord.h.

Referenced by setLocalBxNr().

const int L1GtPsbWord::LocalBxNrShift = 0
staticprivate

Definition at line 262 of file L1GtPsbWord.h.

Referenced by setLocalBxNr(), and setLocalBxNrWord64().

const int L1GtPsbWord::LocalBxNrWord = 5
staticprivate

Definition at line 260 of file L1GtPsbWord.h.

Referenced by setLocalBxNr(), and setLocalBxNrWord64().

boost::uint16_t L1GtPsbWord::m_aData[NumberAData]
private

Definition at line 281 of file L1GtPsbWord.h.

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

boost::uint16_t L1GtPsbWord::m_bData[NumberBData]
private

Definition at line 283 of file L1GtPsbWord.h.

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

boost::uint16_t L1GtPsbWord::m_boardId
private

Definition at line 272 of file L1GtPsbWord.h.

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

int L1GtPsbWord::m_bxInEvent
private
boost::uint16_t L1GtPsbWord::m_bxNr
private

Definition at line 278 of file L1GtPsbWord.h.

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

boost::uint32_t L1GtPsbWord::m_eventNr
private

Definition at line 279 of file L1GtPsbWord.h.

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

boost::uint16_t L1GtPsbWord::m_localBxNr
private
const int L1GtPsbWord::NumberAData = 8
static
const int L1GtPsbWord::NumberBData = 8
static