Project
Loading...
Searching...
No Matches
o2::header::DataHeader Struct Reference

the main header struct More...

#include <DataHeader.h>

Inherits o2::header::BaseHeader.

Public Types

using SubSpecificationType = uint32_t
 
using SplitPayloadIndexType = uint32_t
 
using SplitPayloadPartsType = uint32_t
 
using PayloadSizeType = uint64_t
 
using TForbitType = uint32_t
 
using TFCounterType = uint32_t
 
using RunNumberType = uint32_t
 

Public Member Functions

constexpr DataHeader ()
 
constexpr DataHeader (DataDescription desc, DataOrigin origin, SubSpecificationType subspec, PayloadSizeType size=0)
 
constexpr DataHeader (DataDescription desc, DataOrigin origin, SubSpecificationType subspec, PayloadSizeType size, SplitPayloadIndexType partIndex, SplitPayloadPartsType parts)
 
 DataHeader (const DataHeader &)=default
 
DataHeaderoperator= (const DataHeader &)=default
 
bool operator== (const DataHeader &) const
 
bool operator== (const DataOrigin &) const
 
bool operator== (const DataDescription &) const
 
bool operator== (const SerializationMethod &) const
 
- Public Member Functions inherited from o2::header::BaseHeader
 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 BaseHeadernext () const noexcept
 get the next header if any (const version)
 
BaseHeadernext () 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 DataHeaderGet (const BaseHeader *baseHeader)
 
- Static Public Member Functions inherited from o2::header::BaseHeader
static const BaseHeaderget (const std::byte *b, size_t=0)
 access header in buffer
 
static BaseHeaderget (std::byte *b, size_t=0)
 access header in buffer
 

Public Attributes

DataDescription dataDescription
 
DataOrigin dataOrigin
 
SplitPayloadPartsType splitPayloadParts = 0
 
SerializationMethod payloadSerializationMethod = SerializationMethod(gInvalidToken64)
 
SubSpecificationType subSpecification
 
SplitPayloadIndexType splitPayloadIndex = 0
 
PayloadSizeType payloadSize
 
TForbitType firstTForbit
 
TFCounterType tfCounter
 
RunNumberType runNumber
 
- Public Attributes inherited from o2::header::BaseHeader
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 sVersion {3}
 
static constexpr o2::header::HeaderType sHeaderType {String2<uint64_t>("DataHead")}
 
static constexpr o2::header::SerializationMethod sSerializationMethod {gSerializationMethodNone}
 
- Static Public Attributes inherited from o2::header::BaseHeader
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
 

Detailed Description

the main header struct

The main O2 data header struct. All messages should have it, preferably at the beginning of the header stack. It contains the fields that describe the buffer size, data type, origin and serialization method used to construct the buffer. The member subSpecification might be defined differently for each type/origin, interpretation of this field is up to the specific subsystem involved.

Definition at line 618 of file DataHeader.h.

Member Typedef Documentation

◆ PayloadSizeType

Definition at line 623 of file DataHeader.h.

◆ RunNumberType

Definition at line 626 of file DataHeader.h.

◆ SplitPayloadIndexType

Definition at line 621 of file DataHeader.h.

◆ SplitPayloadPartsType

Definition at line 622 of file DataHeader.h.

◆ SubSpecificationType

Definition at line 620 of file DataHeader.h.

◆ TFCounterType

Definition at line 625 of file DataHeader.h.

◆ TForbitType

Definition at line 624 of file DataHeader.h.

Constructor & Destructor Documentation

◆ DataHeader() [1/4]

constexpr o2::header::DataHeader::DataHeader ( )
inlineconstexpr

Definition at line 688 of file DataHeader.h.

◆ DataHeader() [2/4]

constexpr o2::header::DataHeader::DataHeader ( DataDescription  desc,
DataOrigin  origin,
SubSpecificationType  subspec,
PayloadSizeType  size = 0 
)
inlineexplicitconstexpr

Definition at line 704 of file DataHeader.h.

◆ DataHeader() [3/4]

constexpr o2::header::DataHeader::DataHeader ( DataDescription  desc,
DataOrigin  origin,
SubSpecificationType  subspec,
PayloadSizeType  size,
SplitPayloadIndexType  partIndex,
SplitPayloadPartsType  parts 
)
inlineexplicitconstexpr

Definition at line 720 of file DataHeader.h.

◆ DataHeader() [4/4]

o2::header::DataHeader::DataHeader ( const DataHeader )
default

Member Function Documentation

◆ Get()

static const DataHeader * o2::header::DataHeader::Get ( const BaseHeader baseHeader)
inlinestatic

Definition at line 743 of file DataHeader.h.

◆ operator=()

DataHeader & o2::header::DataHeader::operator= ( const DataHeader )
default

◆ operator==() [1/4]

bool o2::header::DataHeader::operator== ( const DataDescription that) const

Definition at line 63 of file DataHeader.cxx.

◆ operator==() [2/4]

bool o2::header::DataHeader::operator== ( const DataHeader that) const

Definition at line 79 of file DataHeader.cxx.

◆ operator==() [3/4]

bool o2::header::DataHeader::operator== ( const DataOrigin that) const

Definition at line 56 of file DataHeader.cxx.

◆ operator==() [4/4]

bool o2::header::DataHeader::operator== ( const SerializationMethod that) const

Definition at line 72 of file DataHeader.cxx.

Member Data Documentation

◆ dataDescription

DataDescription o2::header::DataHeader::dataDescription

data type descriptor

Definition at line 636 of file DataHeader.h.

◆ dataOrigin

DataOrigin o2::header::DataHeader::dataOrigin

origin of the data (originating detector)

Definition at line 641 of file DataHeader.h.

◆ firstTForbit

TForbitType o2::header::DataHeader::firstTForbit

first orbit of time frame, since v2

Definition at line 674 of file DataHeader.h.

◆ payloadSerializationMethod

SerializationMethod o2::header::DataHeader::payloadSerializationMethod = SerializationMethod(gInvalidToken64)

serialization method

Definition at line 651 of file DataHeader.h.

◆ payloadSize

PayloadSizeType o2::header::DataHeader::payloadSize

size of the associated data buffer

Definition at line 666 of file DataHeader.h.

◆ runNumber

RunNumberType o2::header::DataHeader::runNumber

run number TF belongs to, since v3

Definition at line 684 of file DataHeader.h.

◆ sHeaderType

constexpr o2::header::HeaderType o2::header::DataHeader::sHeaderType {String2<uint64_t>("DataHead")}
staticconstexpr

Definition at line 630 of file DataHeader.h.

◆ splitPayloadIndex

SplitPayloadIndexType o2::header::DataHeader::splitPayloadIndex = 0

index of the split payload

Definition at line 661 of file DataHeader.h.

◆ splitPayloadParts

SplitPayloadPartsType o2::header::DataHeader::splitPayloadParts = 0

How many split payloads in total

Definition at line 646 of file DataHeader.h.

◆ sSerializationMethod

constexpr o2::header::SerializationMethod o2::header::DataHeader::sSerializationMethod {gSerializationMethodNone}
staticconstexpr

Definition at line 631 of file DataHeader.h.

◆ subSpecification

SubSpecificationType o2::header::DataHeader::subSpecification

sub specification (e.g. link number)

Definition at line 656 of file DataHeader.h.

◆ sVersion

constexpr uint32_t o2::header::DataHeader::sVersion {3}
staticconstexpr

Definition at line 629 of file DataHeader.h.

◆ tfCounter

TFCounterType o2::header::DataHeader::tfCounter

ever incrementing TF counter, allows to disentangle even TFs with same firstTForbit in case of replay, since v3

Definition at line 679 of file DataHeader.h.


The documentation for this struct was generated from the following files: