![]() |
Project
|
the base header struct Every header type must begin (i.e. derive) with this. Don't use this struct directly. The derived header must initialize BaseHeader fields with appropriate values More...
#include <DataHeader.h>
Inherited by o2::cpv::CPVBlockHeader, o2::emcal::EMCALBlockHeader, o2::framework::DataProcessingHeader, o2::framework::DomainInfoHeader, o2::framework::OutputObjHeader, o2::framework::SourceInfoHeader, o2::header::DataHeader, o2::header::HeartbeatFrameEnvelope, o2::header::NameHeader< N >, o2::header::test::MetaHeader, o2::phos::PHOSBlockHeader, o2::tpc::TPCSectorHeader, o2::utilities::DataSamplingHeader, test::MetaHeader, test::SequenceDesc, and test_header::MsgModeHeader.
Public Member Functions | |
| BaseHeader ()=delete | |
| dont construct directly | |
| BaseHeader (const BaseHeader &)=default | |
| constexpr | BaseHeader (uint32_t mySize, HeaderType desc, SerializationMethod ser, uint32_t version) |
| Special ctor for initialization in derived types. | |
| constexpr uint32_t | size () const noexcept |
| const std::byte * | data () const noexcept |
| const BaseHeader * | next () const noexcept |
| get the next header if any (const version) | |
| BaseHeader * | next () noexcept |
| get the next header if any (non-const version) | |
| bool | sanityCheck (uint32_t expectedVersion) const |
| void | throwInconsistentStackError () const |
Static Public Member Functions | |
| static const BaseHeader * | get (const std::byte *b, size_t=0) |
| access header in buffer | |
| static BaseHeader * | get (std::byte *b, size_t=0) |
| access header in buffer | |
Public Attributes | ||
| union { | ||
| char magicString [gSizeMagicString] | ||
| uint32_t magicStringInt | ||
| }; | ||
| a magic string, used to identify an O2 header in a raw stream of bytes | ||
| uint32_t | headerSize | |
| union { | ||
| uint32_t flags | ||
| struct { | ||
| uint32_t flagsNextHeader: 1 | ||
| uint32_t flagsReserved: 15 | ||
| uint32_t flagsDerivedHeader: 16 | ||
| } | ||
| }; | ||
| flags, first bit indicates that a sub header follows | ||
| uint32_t | headerVersion | |
| version of the entire header, set by the derived header | ||
| o2::header::HeaderType | description | |
| header type description, set by derived header | ||
| o2::header::SerializationMethod | serialization | |
| header serialization method, set by derived header | ||
Static Public Attributes | |
| static constexpr uint32_t | sMagicString {String2<uint32_t>("O2O2")} |
| static const uint32_t | sVersion = o2::header::gInvalidToken32 |
| static const o2::header::HeaderType | sHeaderType = o2::header::gInvalidToken64 |
| static const o2::header::SerializationMethod | sSerializationMethod = o2::header::gInvalidToken64 |
the base header struct Every header type must begin (i.e. derive) with this. Don't use this struct directly. The derived header must initialize BaseHeader fields with appropriate values
Definition at line 354 of file DataHeader.h.
|
delete |
dont construct directly
|
default |
|
inlineconstexpr |
Special ctor for initialization in derived types.
Definition at line 399 of file DataHeader.h.
|
inlinenoexcept |
Definition at line 425 of file DataHeader.h.
|
inlinestatic |
access header in buffer
this is to guess if the buffer starting at b looks like a header
Definition at line 408 of file DataHeader.h.
|
inlinestatic |
access header in buffer
this is to guess if the buffer starting at b looks like a header
Definition at line 418 of file DataHeader.h.
|
inlinenoexcept |
get the next header if any (const version)
Definition at line 428 of file DataHeader.h.
|
inlinenoexcept |
get the next header if any (non-const version)
Definition at line 436 of file DataHeader.h.
| bool o2::header::BaseHeader::sanityCheck | ( | uint32_t | expectedVersion | ) | const |
check if the header matches expected version throws runtime error if not matching we might change this behavior if we want to support multiple version of a particular header but until we have this support we need to be strict to catch a problem early and with meaningful error message
Definition at line 36 of file DataHeader.cxx.
|
inlineconstexprnoexcept |
Definition at line 424 of file DataHeader.h.
| void o2::header::BaseHeader::throwInconsistentStackError | ( | ) | const |
throw runtime error to report inconsistent header stack when the next-header flag is set but no next header is found; implemented only once, no template overloads
Definition at line 50 of file DataHeader.cxx.
| union { ... } o2::header::BaseHeader |
a magic string, used to identify an O2 header in a raw stream of bytes
| union { ... } o2::header::BaseHeader |
flags, first bit indicates that a sub header follows
| o2::header::HeaderType o2::header::BaseHeader::description |
header type description, set by derived header
Definition at line 388 of file DataHeader.h.
| uint32_t o2::header::BaseHeader::flags |
Definition at line 376 of file DataHeader.h.
| uint32_t o2::header::BaseHeader::flagsDerivedHeader |
Definition at line 380 of file DataHeader.h.
| uint32_t o2::header::BaseHeader::flagsNextHeader |
Definition at line 378 of file DataHeader.h.
| uint32_t o2::header::BaseHeader::flagsReserved |
Definition at line 379 of file DataHeader.h.
| uint32_t o2::header::BaseHeader::headerSize |
size of the header that starts with this sequence (base + derived header) set by the derived header
Definition at line 372 of file DataHeader.h.
| uint32_t o2::header::BaseHeader::headerVersion |
version of the entire header, set by the derived header
Definition at line 385 of file DataHeader.h.
| char o2::header::BaseHeader::magicString[gSizeMagicString] |
Definition at line 366 of file DataHeader.h.
| uint32_t o2::header::BaseHeader::magicStringInt |
Definition at line 367 of file DataHeader.h.
| o2::header::SerializationMethod o2::header::BaseHeader::serialization |
header serialization method, set by derived header
Definition at line 391 of file DataHeader.h.
|
static |
Definition at line 359 of file DataHeader.h.
|
staticconstexpr |
Definition at line 356 of file DataHeader.h.
|
static |
Definition at line 360 of file DataHeader.h.
|
static |
License text in a separate file.
In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.
Definition at line 358 of file DataHeader.h.