![]() |
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 351 of file DataHeader.h.
|
delete |
dont construct directly
|
default |
|
inlineconstexpr |
Special ctor for initialization in derived types.
Definition at line 396 of file DataHeader.h.
|
inlinenoexcept |
Definition at line 422 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 405 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 415 of file DataHeader.h.
|
inlinenoexcept |
get the next header if any (const version)
Definition at line 425 of file DataHeader.h.
|
inlinenoexcept |
get the next header if any (non-const version)
Definition at line 433 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 421 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 385 of file DataHeader.h.
uint32_t o2::header::BaseHeader::flags |
Definition at line 373 of file DataHeader.h.
uint32_t o2::header::BaseHeader::flagsDerivedHeader |
Definition at line 377 of file DataHeader.h.
uint32_t o2::header::BaseHeader::flagsNextHeader |
Definition at line 375 of file DataHeader.h.
uint32_t o2::header::BaseHeader::flagsReserved |
Definition at line 376 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 369 of file DataHeader.h.
uint32_t o2::header::BaseHeader::headerVersion |
version of the entire header, set by the derived header
Definition at line 382 of file DataHeader.h.
char o2::header::BaseHeader::magicString[gSizeMagicString] |
Definition at line 363 of file DataHeader.h.
uint32_t o2::header::BaseHeader::magicStringInt |
Definition at line 364 of file DataHeader.h.
o2::header::SerializationMethod o2::header::BaseHeader::serialization |
header serialization method, set by derived header
Definition at line 388 of file DataHeader.h.
|
static |
Definition at line 356 of file DataHeader.h.
|
staticconstexpr |
Definition at line 353 of file DataHeader.h.
|
static |
Definition at line 357 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 355 of file DataHeader.h.