![]() |
Project
|
#include <RawParser.h>
Classes | |
class | Iterator |
struct | RawDataHeaderInfo |
Public Types | |
using | buffer_type = unsigned char |
using | self_type = RawParser< MAX_SIZE, BOUNDS_CHECKS > |
using | const_iterator = Iterator< RawDataHeaderInfo const, raw_parser::ConcreteParserVariants< MAX_SIZE, BOUNDS_CHECKS > > |
Public Member Functions | |
RawParser ()=delete | |
template<typename T > | |
RawParser (T const *buffer, size_t size) | |
Constructor, raw buffer provided by pointer and size. | |
template<typename Processor > | |
void | parse (Processor &&processor) |
Parse complete raw buffer and call processor on payload data for each page. | |
bool | reset () |
Reset parser and set position to beginning of buffer. | |
const_iterator | begin () const |
const_iterator | end () const |
size_t | getNErrors () const |
Static Public Member Functions | |
static void | setCheckIncompleteHBF (bool v) |
Static Public Attributes | |
static size_t const | max_size = MAX_SIZE |
Friends | |
std::ostream & | operator<< (std::ostream &os, self_type const &parser) |
the O2 raw data O2 raw data is organized in pages of a fixed size, each page starts with the RAWDataHeader The page size may actually be smaller than the maximum size, depending on the header fields.
The parser class works on a contiguous sequence of raw pages in a raw buffer. Multiple versions of RAWDataHeader are supported transparently and selected depending on the version field of the header.
// option 1: parse method RawParser parser(buffer, size); auto processor = [&count](auto data, size_t size) { std::cout << "Processing block of size " << size << std::endl; }; parser.parse(processor); // option 2: iterator RawParser parser(buffer, size); for (auto it = parser.begin(), end = parser.end(); it != end; ++it, ++count) { std::cout << "Iterating block of size " << it.size() << std::endl; auto dataptr = it.data(); }TODO:
Definition at line 465 of file RawParser.h.
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::buffer_type = unsigned char |
Definition at line 468 of file RawParser.h.
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::const_iterator = Iterator<RawDataHeaderInfo const, raw_parser::ConcreteParserVariants<MAX_SIZE, BOUNDS_CHECKS> > |
Definition at line 616 of file RawParser.h.
using o2::framework::RawParser< MAX_SIZE, BOUNDS_CHECKS >::self_type = RawParser<MAX_SIZE, BOUNDS_CHECKS> |
Definition at line 470 of file RawParser.h.
|
delete |
|
inline |
Constructor, raw buffer provided by pointer and size.
Definition at line 476 of file RawParser.h.
|
inline |
Definition at line 618 of file RawParser.h.
|
inline |
Definition at line 623 of file RawParser.h.
|
inline |
Definition at line 642 of file RawParser.h.
|
inline |
Parse complete raw buffer and call processor on payload data for each page.
Definition at line 485 of file RawParser.h.
|
inline |
Reset parser and set position to beginning of buffer.
Definition at line 495 of file RawParser.h.
|
inlinestatic |
Definition at line 647 of file RawParser.h.
|
friend |
Definition at line 628 of file RawParser.h.
|
static |
Definition at line 469 of file RawParser.h.