135 m_bxInEvent = (hexBxInEvent + baseValue / 2) % baseValue - baseValue / 2;
144 int hexBxInEvent = (
m_bxInEvent + baseValue) % baseValue;
184 <<
"\nError: index for A_DATA array out of range. Allowed range: [0, " <<
NumberAData <<
") " << std::endl;
194 <<
"\nError: index for A_DATA array out of range. Allowed range: [0, " <<
NumberAData <<
") " << std::endl;
204 int sizeW64 =
sizeof(word64) * 8;
208 for (
int i = 0;
i < nSubWords; ++
i) {
210 m_aData[
i] = (word64 & (DataCHMask << dataShift)) >> dataShift;
219 for (
int i = 0;
i < nSubWords; ++
i) {
221 m_aData[
i + nSubWords] = (word64 & (DataCHMask << dataShift)) >> dataShift;
234 int sizeW64 =
sizeof(word64) * 8;
238 for (
int i = 0;
i < nSubWords; ++
i) {
244 for (
int i = 0;
i < nSubWords; ++
i) {
256 <<
"\nError: index for B_DATA array out of range. Allowed range: [0, " <<
NumberBData <<
") " << std::endl;
266 <<
"\nError: index for B_DATA array out of range. Allowed range: [0, " <<
NumberBData <<
") " << std::endl;
276 int sizeW64 =
sizeof(word64) * 8;
280 for (
int i = 0;
i < nSubWords; ++
i) {
282 m_bData[
i] = (word64 & (DataCHMask << dataShift)) >> dataShift;
286 for (
int i = 0;
i < nSubWords; ++
i) {
288 m_bData[
i + nSubWords] = (word64 & (DataCHMask << dataShift)) >> dataShift;
296 int sizeW64 =
sizeof(word64) * 8;
300 for (
int i = 0;
i < nSubWords; ++
i) {
306 for (
int i = 0;
i < nSubWords; ++
i) {
349 myCout <<
"\n L1GtPsbWord::print \n" << std::endl;
351 myCout <<
" Board Id: " << std::hex <<
" hex: " << std::setw(4) << std::setfill(
'0') <<
m_boardId 355 int hexBxInEvent = (
m_bxInEvent + baseValue) % baseValue;
357 myCout <<
" BxInEvent: " << std::hex <<
" hex: " 358 <<
" " << std::setw(1) << hexBxInEvent <<
std::dec <<
" dec: " <<
m_bxInEvent << std::endl;
360 myCout <<
" BxNr: " << std::hex <<
" hex: " 361 <<
" " << std::setw(3) << std::setfill(
'0') <<
m_bxNr << std::setfill(
' ') <<
std::dec <<
" dec: " <<
m_bxNr 364 myCout <<
" EventNr: " << std::hex <<
" hex: " 365 <<
" " << std::setw(6) << std::setfill(
'0') <<
m_eventNr << std::setfill(
' ') <<
std::dec 377 << std::hex <<
" hex: " << std::setfill(
'0');
379 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
380 int iCh = dataBlocksPerLine - (
i + 1);
381 myCout << std::setw(4) <<
m_aData[iCh] <<
" ";
384 myCout <<
"\n" <<
std::dec <<
" dec: ";
386 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
387 int iCh = dataBlocksPerLine - (
i + 1);
388 myCout << std::setw(5) <<
m_aData[iCh] <<
" ";
397 << std::hex <<
" hex: " << std::setfill(
'0');
399 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
400 int iCh = dataBlocksPerLine - (
i + 1);
401 myCout << std::setw(4) <<
m_aData[iCh + dataBlocksPerLine] <<
" ";
404 myCout <<
"\n" <<
std::dec <<
" dec: ";
406 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
407 int iCh = dataBlocksPerLine - (
i + 1);
408 myCout << std::setw(5) <<
m_aData[iCh + dataBlocksPerLine] <<
" ";
419 << std::hex <<
" hex: " << std::setfill(
'0');
421 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
422 int iCh = dataBlocksPerLine - (
i + 1);
423 myCout << std::setw(4) <<
m_bData[iCh] <<
" ";
426 myCout <<
"\n" <<
std::dec <<
" dec: ";
428 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
429 int iCh = dataBlocksPerLine - (
i + 1);
430 myCout << std::setw(5) <<
m_bData[iCh] <<
" ";
439 << std::hex <<
" hex: " << std::setfill(
'0');
441 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
442 int iCh = dataBlocksPerLine - (
i + 1);
443 myCout << std::setw(4) <<
m_bData[iCh + dataBlocksPerLine] <<
" ";
446 myCout <<
"\n" <<
std::dec <<
" dec: ";
448 for (
int i = 0;
i < dataBlocksPerLine; ++
i) {
449 int iCh = dataBlocksPerLine - (
i + 1);
450 myCout << std::setw(5) <<
m_bData[iCh + dataBlocksPerLine] <<
" ";
453 myCout <<
"\n" << std::endl;
455 myCout <<
" LocalBxNr: " << std::hex <<
" hex: " 456 <<
" " << std::setw(3) << std::setfill(
'0') <<
m_localBxNr << std::setfill(
' ') <<
std::dec static const int LocalBxNrWord
static const int BoardIdShift
void setEventNrWord64(cms_uint64_t &word64, int iWord)
void reset()
reset the content of a L1GtPsbWord
static const int BDataCH0Word
const cms_uint16_t aData(int iA) const
get/set A_DATA_CH_IA
static const cms_uint64_t BoardIdMask
static const int EventNrWord
void setBData(cms_uint16_t bDataVal, int iB)
static const cms_uint64_t LocalBxNrMask
void setBxNrWord64(cms_uint64_t &word64, int iWord)
static const int BoardIdWord
bool operator!=(const L1GtPsbWord &) const
unequal operator
static const cms_uint64_t BxInEventMask
const cms_uint16_t bData(int iB) const
get/set B_DATA_CH_IB
cms_uint16_t m_bData[NumberBData]
static const int BxInEventShift
void setBxInEventWord64(cms_uint64_t &word64, int iWord)
void setEventNr(cms_uint32_t eventNrValue)
static const int DataCHSize
void setBxNr(cms_uint16_t bxNrValue)
void setADataWord64(cms_uint64_t &word64, int iWord)
void print(std::ostream &myCout) const
pretty print
void setBoardId(cms_uint16_t boardIdValue)
void setLocalBxNrWord64(cms_uint64_t &word64, int iWord)
bool operator==(const L1GtPsbWord &) const
equal operator
void setBxInEvent(int bxInEventValue)
virtual ~L1GtPsbWord()
destructor
unsigned short cms_uint16_t
void setBDataWord64(cms_uint64_t &word64, int iWord)
unsigned int cms_uint32_t
L1GtPsbWord()
constructors
static const int LocalBxNrShift
static const int BxInEventWord
static const int NumberBData
static const cms_uint64_t EventNrMask
static const int ADataCH0Word
static const int EventNrShift
static const int BDataCH4Word
static const int BxNrWord
static const int NumberAData
void setLocalBxNr(cms_uint16_t localBxNrValue)
static const cms_uint64_t BxNrMask
unsigned long long cms_uint64_t
cms_uint16_t m_aData[NumberAData]
void setAData(cms_uint16_t aDataVal, int iA)
void setBoardIdWord64(cms_uint64_t &word64, int iWord)
static const int ADataCH4Word
static const int BxNrShift