11#ifndef ALICEO2_EMCAL_RAWBUFFER_H
12#define ALICEO2_EMCAL_RAWBUFFER_H
35 void reset() { mCurrentDataWord = 0; }
72 const gsl::span<const uint32_t>
getDataWords()
const {
return gsl::span<const uint32_t>(mDataWords.data(), mNDataWords); }
78 bool hasNext()
const {
return mCurrentDataWord < mNDataWords; }
81 std::array<uint32_t, 2048> mDataWords;
83 int mCurrentDataWord = 0;
Buffer for EMCAL raw pages.
void readFromMemoryBuffer(const gsl::span< const char > rawmemory)
Read page from raw memory buffer.
const gsl::span< const uint32_t > getDataWords() const
Get all data words from the raw buffer.
bool hasNext() const
Check whether the next data word exists.
uint32_t getWord(int index) const
Get the data word at a given index.
uint32_t getNextDataWord()
Get the next data word in the superpage.
void readFromStream(std::istream &in, uint32_t payloadsize)
Read page from stream.
void flush()
Flush the buffer Does not overwrite the word buffer but just resets the counter and iterator.
int getNDataWords() const
Get the number of data words read for the superpage.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...