![]() |
Project
|
Reader for raw data produced by the Readout application in in-memory format. More...
#include <RawReaderMemory.h>
Public Member Functions | |
RawReaderMemory (const gsl::span< const char > rawmemory) | |
Constructor. | |
~RawReaderMemory ()=default | |
Destructor. | |
void | setRawMemory (const gsl::span< const char > rawmemory) |
set new raw memory chunk | |
RawErrorType_t | next () |
Read next payload from the stream. | |
RawErrorType_t | nextPage () |
Read the next page from the stream (single DMA page) | |
const o2::header::RDHAny & | getRawHeader () const |
access to the raw header of the current page | |
const std::vector< char > & | getPayload () const |
access to the full raw payload (single or multiple DMA pages) | |
int | getPayloadSize () const |
Return size of the payload. | |
int | getFileSize () const noexcept |
get the size of the file in bytes | |
bool | hasNext () const |
check if more pages are available in the raw file | |
uint32_t | getCurrentHBFOrbit () const |
uint8_t | getDataFormat () const |
get data format from RDH | |
Protected Member Functions | |
void | init () |
Initialize the raw stream. | |
o2::header::RDHAny | decodeRawHeader (const void *headerwords) |
Reader for raw data produced by the Readout application in in-memory format.
It reads one HBF, stores HBF orbit number in getCurrentHBFOrbit() and produces digits in AddressChargeBC format
Definition at line 56 of file RawReaderMemory.h.
RawReaderMemory::RawReaderMemory | ( | const gsl::span< const char > | rawmemory | ) |
Constructor.
Definition at line 22 of file RawReaderMemory.cxx.
|
default |
Destructor.
|
protected |
Definition at line 33 of file RawReaderMemory.cxx.
|
inline |
Definition at line 105 of file RawReaderMemory.h.
|
inline |
get data format from RDH
Definition at line 109 of file RawReaderMemory.h.
|
inlinenoexcept |
get the size of the file in bytes
Definition at line 98 of file RawReaderMemory.h.
|
inline |
access to the full raw payload (single or multiple DMA pages)
Definition at line 90 of file RawReaderMemory.h.
|
inline |
Return size of the payload.
Definition at line 94 of file RawReaderMemory.h.
|
inline |
access to the raw header of the current page
Definition at line 86 of file RawReaderMemory.h.
|
inline |
check if more pages are available in the raw file
Definition at line 102 of file RawReaderMemory.h.
|
protected |
Initialize the raw stream.
Rewind stream to the first entry
Definition at line 43 of file RawReaderMemory.cxx.
RawErrorType_t RawReaderMemory::next | ( | ) |
Read next payload from the stream.
Read the next pages until the stop bit is found.
Definition at line 55 of file RawReaderMemory.cxx.
RawErrorType_t RawReaderMemory::nextPage | ( | ) |
Read the next page from the stream (single DMA page)
resetPayload | If true the raw payload is reset |
Error | if the page cannot be read or header or payload cannot be deocded |
Function reading a single DMA page from the stream. It is called inside the next() function for reading payload from multiple DMA pages. As the function cannot handle payload from multiple pages it should not be called directly by the user.
Definition at line 77 of file RawReaderMemory.cxx.
set new raw memory chunk
rawmemory | New raw memory chunk |
Definition at line 27 of file RawReaderMemory.cxx.