![]() |
Project
|
#include <RawParser.h>
Public Types | |
using | buffer_type = unsigned char |
using | header_type = HeaderType |
using | self_type = ConcreteRawParser |
Public Member Functions | |
ConcreteRawParser ()=delete | |
template<typename T > | |
ConcreteRawParser (T const *buffer, size_t size) | |
ConcreteRawParser (ConcreteRawParser const &other)=default | |
header_type const & | header () const |
Get header at current position. | |
size_t | size () const |
Get size of payload at current position. | |
size_t | sizeTotal () const |
Get size of header + payload at current position. | |
buffer_type const * | data () const |
Get pointer to payload data at current position. | |
buffer_type const * | raw () const |
Get pointer to raw buffer at current position. | |
size_t | offset () const |
Get offset of payload in the raw buffer at current position. | |
bool | checkPageInBuffer () const |
template<typename Processor > | |
void | parse (Processor &&processor) |
bool | next () |
Move to next page start. | |
bool | reset () |
Reset the parser, set position to beginning of buffer. | |
void | advance (int step) |
size_t | getNErrors () const |
template<typename T = self_type> | |
bool | operator== (T const &other) const |
void | format (std::ostream &os, FormatSpec choice=FormatSpec::Entry, const char *delimiter="\n") const |
Static Public Attributes | |
static constexpr size_t | max_size = MAX_SIZE |
Raw parser implementation for a particular version of RAWDataHeader. Parses a contiguous sequence of raw pages in a raw buffer.
Template parameters: HeaderType the raw data header type MAX_SIZE maximum page size BOUNDS_CHECKS check buffer bounds while navigating RDHs
We expect the actual page size to be variable up to the maximum size, actual size given by fields of the RAWDataHeader.
Definition at line 108 of file RawParser.h.
using o2::framework::raw_parser::ConcreteRawParser< HeaderType, MAX_SIZE, BOUNDS_CHECKS >::buffer_type = unsigned char |
Definition at line 111 of file RawParser.h.
using o2::framework::raw_parser::ConcreteRawParser< HeaderType, MAX_SIZE, BOUNDS_CHECKS >::header_type = HeaderType |
Definition at line 112 of file RawParser.h.
using o2::framework::raw_parser::ConcreteRawParser< HeaderType, MAX_SIZE, BOUNDS_CHECKS >::self_type = ConcreteRawParser |
Definition at line 113 of file RawParser.h.
|
delete |
|
inline |
Constructor Raw buffer is provided by pointer and size, read-only access
Definition at line 121 of file RawParser.h.
|
default |
copy constructor, we allow for copies of the parser because acces to the underlying buffer is read-only, the copy starts at the same state mainly used for the iterator
|
inline |
Advance position by number of steps Positions are given by RAWDataHeaders, either at fixed page size or variable length.
step | Step number to advance, if -1 position is set beyond the buffer (end iterator) |
Definition at line 312 of file RawParser.h.
|
inline |
Definition at line 199 of file RawParser.h.
|
inline |
Get pointer to payload data at current position.
Definition at line 170 of file RawParser.h.
|
inline |
Definition at line 340 of file RawParser.h.
|
inline |
Definition at line 323 of file RawParser.h.
|
inline |
Get header at current position.
Definition at line 138 of file RawParser.h.
|
inline |
Move to next page start.
Definition at line 240 of file RawParser.h.
|
inline |
Get offset of payload in the raw buffer at current position.
Definition at line 190 of file RawParser.h.
|
inline |
Comparison: instances are equal if they serve the same buffer and are in the same state, i.e. at same position
Definition at line 331 of file RawParser.h.
|
inline |
Parse the complete buffer For each page, the processor function is called with the payload buffer and size, processor has signature void(unsigned char const*, size_t)
Definition at line 217 of file RawParser.h.
|
inline |
Get pointer to raw buffer at current position.
Definition at line 181 of file RawParser.h.
|
inline |
Reset the parser, set position to beginning of buffer.
Definition at line 302 of file RawParser.h.
|
inline |
Get size of payload at current position.
Definition at line 144 of file RawParser.h.
|
inline |
Get size of header + payload at current position.
Definition at line 157 of file RawParser.h.
|
staticconstexpr |
Definition at line 114 of file RawParser.h.