Project
Loading...
Searching...
No Matches
o2::framework::DPLRawParser< BOUNDS_CHECKS > Class Template Reference

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)}
 

Detailed Description

template<bool BOUNDS_CHECKS = true>
class o2::framework::DPLRawParser< BOUNDS_CHECKS >

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.

Member Typedef Documentation

◆ buffer_type

template<bool BOUNDS_CHECKS = true>
using o2::framework::DPLRawParser< BOUNDS_CHECKS >::buffer_type = typename rawparser_type::buffer_type

Definition at line 71 of file DPLRawParser.h.

◆ const_iterator

template<bool BOUNDS_CHECKS = true>
using o2::framework::DPLRawParser< BOUNDS_CHECKS >::const_iterator = Iterator<DataRef const>

Definition at line 327 of file DPLRawParser.h.

◆ rawparser_type

template<bool BOUNDS_CHECKS = true>
using o2::framework::DPLRawParser< BOUNDS_CHECKS >::rawparser_type = RawParser<8192, BOUNDS_CHECKS>

Definition at line 70 of file DPLRawParser.h.

◆ RDHInfo

template<bool BOUNDS_CHECKS = true>
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.

Constructor & Destructor Documentation

◆ DPLRawParser() [1/2]

template<bool BOUNDS_CHECKS = true>
o2::framework::DPLRawParser< BOUNDS_CHECKS >::DPLRawParser ( )
delete

◆ DPLRawParser() [2/2]

template<bool BOUNDS_CHECKS = true>
o2::framework::DPLRawParser< BOUNDS_CHECKS >::DPLRawParser ( InputRecord inputs,
std::vector< InputSpec filterSpecs = {},
fair::Severity  sev = fair::Severity::alarm 
)
inline

Definition at line 74 of file DPLRawParser.h.

Member Function Documentation

◆ begin()

template<bool BOUNDS_CHECKS = true>
const_iterator o2::framework::DPLRawParser< BOUNDS_CHECKS >::begin ( ) const
inline

Definition at line 329 of file DPLRawParser.h.

◆ end()

template<bool BOUNDS_CHECKS = true>
const_iterator o2::framework::DPLRawParser< BOUNDS_CHECKS >::end ( ) const
inline

Definition at line 334 of file DPLRawParser.h.

◆ setCheckIncompleteHBF()

template<bool BOUNDS_CHECKS = true>
static void o2::framework::DPLRawParser< BOUNDS_CHECKS >::setCheckIncompleteHBF ( bool  v)
inlinestatic

Definition at line 78 of file DPLRawParser.h.

◆ setExtFailureCounter()

template<bool BOUNDS_CHECKS = true>
void o2::framework::DPLRawParser< BOUNDS_CHECKS >::setExtFailureCounter ( size_t *  cnt)
inline

Definition at line 77 of file DPLRawParser.h.

◆ setMaxFailureMessages()

template<bool BOUNDS_CHECKS = true>
void o2::framework::DPLRawParser< BOUNDS_CHECKS >::setMaxFailureMessages ( size_t  n)
inline

Definition at line 76 of file DPLRawParser.h.

Member Data Documentation

◆ initializer

template<bool BOUNDS_CHECKS = true>
constexpr o2::header::RAWDataHeader o2::framework::DPLRawParser< BOUNDS_CHECKS >::initializer = o2::header::RAWDataHeader{.memorySize = sizeof(o2::header::RAWDataHeader)}
staticconstexpr

Definition at line 82 of file DPLRawParser.h.


The documentation for this class was generated from the following file: