11#ifndef ALICEO2_EMCAL_RAWREADERMEMORY_H
12#define ALICEO2_EMCAL_RAWREADERMEMORY_H
89 void setRawMemory(
const gsl::span<const char> rawmemory);
113 void nextPage(
bool resetPayload =
true);
139 int getFileSize() const noexcept {
return mRawMemoryBuffer.size(); }
143 bool hasNext()
const {
return mCurrentPosition < mRawMemoryBuffer.size(); }
158 gsl::span<const char> mRawMemoryBuffer;
163 uint64_t mTrailerPayloadWords = 0;
164 uint16_t mMinSRUDDL = 0;
165 uint16_t mMaxSRUDDL = 39;
166 int mCurrentPosition = 0;
167 int mCurrentFEE = -1;
168 bool mRawHeaderInitialized =
false;
169 bool mPayloadInitialized =
false;
170 std::vector<MinorError> mMinorErrors;
Information stored in the RCU trailer.
Buffer for EMCAL raw pages.
ErrorType_t
Codes for different error types.
Class for raw payload excluding raw data headers from one or multiple DMA pages.
int getPayloadSize() const
Get the size of the payload.
Minor (non-crashing) raw decoding errors.
~MinorError()=default
Destructor.
RawDecodingError::ErrorType_t getErrorType() const
Get type of the error.
void setErrorType(RawDecodingError::ErrorType_t errortype)
Set the type of the error.
MinorError(RawDecodingError::ErrorType_t errortype, int feeID)
Main constructor.
int getFEEID() const
Get ID of the FEE.
MinorError()=default
Dummy constructor.
void setFEEID(int feeID)
Set the ID of the FEE equipment.
Reader for raw data produced by the Readout application in in-memory format.
bool hasNext() const
check if more pages are available in the raw file
const o2::header::RDHAny & getRawHeader() const
access to the raw header of the current page
void setRangeSRUDDLs(uint16_t minDDL, uint16_t maxDDL)
Set range for DDLs from SRU (for RCU trailer merging)
int getPayloadSize() const
Return size of the payload.
void setRawMemory(const gsl::span< const char > rawmemory)
set new raw memory chunk
const RawBuffer & getRawBuffer() const
access to the raw buffer (single DMA page)
~RawReaderMemory()=default
Destructor.
void init()
Initialize the raw stream.
void next()
Read next payload from the stream.
gsl::span< const MinorError > getMinorErrors() const
Get minor (non-crashing) raw decoding errors.
const RawPayload & getPayload() const
access to the full raw payload (single or multiple DMA pages)
int getFileSize() const noexcept
get the size of the file in bytes
void nextPage(bool resetPayload=true)
Read the next page from the stream (single DMA page)
o2::header::RDHAny decodeRawHeader(const void *headerwords)
Decode raw header words.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...