11#ifndef ALICEO2_CPV_RAWREADERMEMORY_H
12#define ALICEO2_CPV_RAWREADERMEMORY_H
67 void setRawMemory(
const gsl::span<const char> rawmemory);
90 const std::vector<char>&
getPayload()
const {
return mRawPayload; }
98 int getFileSize() const noexcept {
return mRawMemoryBuffer.size(); }
102 bool hasNext()
const {
return mCurrentPosition < mRawMemoryBuffer.size(); }
120 gsl::span<const char> mRawMemoryBuffer;
122 std::vector<char> mRawPayload;
123 unsigned int mCurrentPosition = 0;
124 bool mRawHeaderInitialized =
false;
125 bool mPayloadInitialized =
false;
126 uint32_t mCurrentHBFOrbit = 0;
127 bool mStopBitWasNotFound;
128 bool mIsJustInited =
false;
129 uint8_t mDataFormat = 0x0;
Reader for raw data produced by the Readout application in in-memory format.
int getPayloadSize() const
Return size of the payload.
RawErrorType_t next()
Read next payload from the stream.
RawErrorType_t nextPage()
Read the next page from the stream (single DMA page)
int getFileSize() const noexcept
get the size of the file in bytes
void setRawMemory(const gsl::span< const char > rawmemory)
set new raw memory chunk
uint8_t getDataFormat() const
get data format from RDH
const std::vector< char > & getPayload() const
access to the full raw payload (single or multiple DMA pages)
void init()
Initialize the raw stream.
bool hasNext() const
check if more pages are available in the raw file
uint32_t getCurrentHBFOrbit() const
o2::header::RDHAny decodeRawHeader(const void *headerwords)
const o2::header::RDHAny & getRawHeader() const
access to the raw header of the current page
~RawReaderMemory()=default
Destructor.
@ kOK_NO_PAYLOAD
No payload per ddl (not error)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...