10 payloadPointer_(getPointerToDataAfterTrackerSpecialHeader() + 16),
11 payloadLength_(getPointerToByteAfterEndOfPayload() - payloadPointer_),
12 versionId_(*(getPointerToDataAfterTrackerSpecialHeader() + 3)) {
24 size_t delayChipStartByteIndex = 0;
28 throw cms::Exception(
"FEDSpyBuffer") <<
"Delay chip " << uint16_t(iDelayChip) <<
" does not fit into buffer. " 29 <<
"Buffer size is " <<
bufferSize() <<
" delay chip data starts at " 30 << delayChipStartByteIndex + 8 + 8 + 8 + 8 <<
". ";
49 result |= runNumberPointer[0];
50 result |= (uint32_t(runNumberPointer[1]) << 8);
51 result |= (uint32_t(runNumberPointer[2]) << 16);
52 result |= (uint32_t(runNumberPointer[3]) << 24);
63 result |= (uint32_t(spyCounters[5]) << 8);
64 result |= (uint32_t(spyCounters[6]) << 16);
65 result |= (uint32_t(spyCounters[7]) << 24);
76 result |= (uint32_t(spyCounters[1]) << 8);
77 result |= (uint32_t(spyCounters[2]) << 16);
78 result |= (uint32_t(spyCounters[3]) << 24);
85 result |= delayChipCounters[4];
86 result |= (uint32_t(delayChipCounters[5]) << 8);
87 result |= (uint32_t(delayChipCounters[6]) << 16);
88 result |= (uint32_t(delayChipCounters[7]) << 24);
95 result |= delayChipCounters[0];
96 result |= (uint32_t(delayChipCounters[1]) << 8);
97 result |= (uint32_t(delayChipCounters[2]) << 16);
98 result |= (uint32_t(delayChipCounters[3]) << 24);
112 uint32_t l1CountBefore = 0;
113 uint32_t totalEventCountBefore = 0;
114 if (delayChip == 0) {
123 const bool eventMatches = ((l1CountBefore == l1CountAfter) && (totalEventCountBefore == totalEventCountAfter));
125 std::ostringstream
ss;
126 ss <<
"Delay chip data was overwritten on chip " << uint16_t(delayChip) <<
" L1A before: " << l1CountBefore
127 <<
" after: " << l1CountAfter <<
" Total event count before: " << totalEventCountBefore
128 <<
" after: " << totalEventCountAfter << std::endl;
142 if (offsetBits < 23) {
143 return ((
data_[offsetWords] >> (32 - 10 - offsetBits)) & 0x3FF);
145 return (((
data_[offsetWords] << (10 - 32 + offsetBits)) & 0x3FF) |
146 ((
data_[offsetWords + 1] & (0xFFC00000 << (32 - offsetBits))) >> (64 - 10 - offsetBits)));
size_t bufferSize() const
uint32_t spyHeaderL1ID() const
uint32_t delayChipL1ID(const uint8_t delayChip) const
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
static const uint16_t SPY_SAMPLES_PER_CHANNEL
const uint8_t * getPointerToDataAfterTrackerSpecialHeader() const
bool delayChipGood(const uint8_t delayChip) const
uint32_t delayChipTotalEventCount(const uint8_t delayChip) const
uint32_t spyHeaderTotalEventCount() const
uint32_t globalRunNumber() const
static const uint16_t DELAY_CHIPS_PER_FED
void dump(std::ostream &os) const
std::vector< FEDChannel > channels_
static const uint16_t FEDCH_PER_DELAY_CHIP
static const uint16_t SPY_DELAY_CHIP_BUFFER_SIZE_IN_BYTES
Log< level::Info, false > LogInfo
const uint8_t * payloadPointer_
static const uint8_t channelPositionsInData_[FEDCH_PER_DELAY_CHIP]
void print(std::ostream &os) const override
bool channelGood(const uint8_t internalFEDannelNum) const override
FEDSpyBuffer(const FEDRawData &fedBuffer)
static const uint16_t SPY_DELAYCHIP_DATA_OFFSET_IN_BITS
virtual void print(std::ostream &os) const