![]() |
Project
|
The parser handles transparently input in the format of raw pages. More...
#include <DPLRawParser.h>
Classes | |
class | Iterator |
Public Types | |
using | rawparser_type = RawParser< 8192, BOUNDS_CHECKS > |
using | buffer_type = typename rawparser_type::buffer_type |
using | const_iterator = Iterator< DataRef const > |
using | RDHInfo = typename o2::framework::DPLRawParser< BOUNDS_CHECKS >::const_iterator::template Fmt< raw_parser::FormatSpec::Info > |
Public Member Functions | |
DPLRawParser ()=delete | |
DPLRawParser (InputRecord &inputs, std::vector< InputSpec > filterSpecs={}, fair::Severity sev=fair::Severity::alarm) | |
void | setMaxFailureMessages (size_t n) |
void | setExtFailureCounter (size_t *cnt) |
const_iterator | begin () const |
const_iterator | end () const |
Static Public Member Functions | |
static void | setCheckIncompleteHBF (bool v) |
Static Public Attributes | |
static constexpr o2::header::RAWDataHeader | initializer = o2::header::RAWDataHeader{.memorySize = sizeof(o2::header::RAWDataHeader)} |
The parser handles transparently input in the format of raw pages.
A DPL processor will receive raw pages accumulated on three levels: 1) the DPL processor has one or more input route(s) 2) multiple parts per input route (split payloads or multiple input specs matching the same route spec 3) variable number of raw pages in one payload
Internally, class RawParser is used to access raw pages withon one payload message and dynamically adopt to RAWDataHeader version.
The parser provides an iterator interface to loop over raw pages, starting at the first raw page of the first payload at the first route and going to the next route when all payloads are processed. The iterator element is RawDataHeaderInfo containing just the two least significant bytes of the RDH where we have the version and header size.
The iterator object provides methods to access the concrete RDH, the raw buffer, the payload, etc.
Usage: DPLRawParser parser(inputs); for (auto it = parser.begin(), end = parser.end(); it != end; ++it) { // retrieving RDH v4 auto const* rdh = it.get_if<o2::header::RAWDataHeaderV4>(); // retrieving the raw pointer of the page auto const* raw = it.raw(); // retrieving payload pointer of the page auto const* payload = it.data(); // size of payload size_t payloadSize = it.size(); // offset of payload in the raw page size_t offset = it.offset(); }
Definition at line 67 of file DPLRawParser.h.
using o2::framework::DPLRawParser< BOUNDS_CHECKS >::buffer_type = typename rawparser_type::buffer_type |
Definition at line 71 of file DPLRawParser.h.
using o2::framework::DPLRawParser< BOUNDS_CHECKS >::const_iterator = Iterator<DataRef const> |
Definition at line 327 of file DPLRawParser.h.
using o2::framework::DPLRawParser< BOUNDS_CHECKS >::rawparser_type = RawParser<8192, BOUNDS_CHECKS> |
Definition at line 70 of file DPLRawParser.h.
using o2::framework::DPLRawParser< BOUNDS_CHECKS >::RDHInfo = typename o2::framework::DPLRawParser<BOUNDS_CHECKS>::const_iterator::template Fmt<raw_parser::FormatSpec::Info> |
Format helper for stream output of the iterator content, print RDH version and table header
Definition at line 341 of file DPLRawParser.h.
|
delete |
|
inline |
Definition at line 74 of file DPLRawParser.h.
|
inline |
Definition at line 329 of file DPLRawParser.h.
|
inline |
Definition at line 334 of file DPLRawParser.h.
|
inlinestatic |
Definition at line 78 of file DPLRawParser.h.
|
inline |
Definition at line 77 of file DPLRawParser.h.
|
inline |
Definition at line 76 of file DPLRawParser.h.
|
staticconstexpr |
Definition at line 82 of file DPLRawParser.h.