Project
Loading...
Searching...
No Matches
o2::header Namespace Reference

O2 data header classes and API, v0.1. More...

Namespaces

namespace  internal
 
namespace  lhc_clock_parameter
 
namespace  test
 

Classes

struct  BaseHeader
 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...
 
class  DAQID
 
struct  DataHeader
 the main header struct More...
 
struct  DataIdentifier
 Helper struct to encode origin and description of data. More...
 
struct  Descriptor
 
struct  HeartbeatFrameEnvelope
 
struct  HeartbeatHeader
 
struct  HeartbeatStatistics
 
struct  HeartbeatTrailer
 
struct  is_descriptor
 
struct  is_descriptor< o2::header::Descriptor< S > >
 
class  LHCClock
 
struct  NameHeader
 an example data header containing a name of an object as a null terminated char arr. this is a template! at instantiation the template parameter determines the size of the held string array. a caveat with decoding is (if length of string is not known) you have to use header::get<NameHeader<0>>(buffer) to get it out of a buffer. May improve in the future if enough people complain. If the compiler decides to pad the end of struct, the length of padding is stored in the last byte More...
 
struct  RAWDataHeaderV2
 
struct  RAWDataHeaderV4
 
struct  RAWDataHeaderV5
 
struct  RAWDataHeaderV6
 
struct  RAWDataHeaderV7
 
struct  RDHAny
 
struct  Stack
 a move-only header stack with serialized headers This is the flat buffer where all the headers in a multi-header go. This guy knows how to move the serialized content to FairMQ and inform it how to release when all is sent. methods to construct a multi-header intended use: More...
 
struct  STFHeader
 
class  TimeStamp
 

Typedefs

using HeaderType = Descriptor< gSizeHeaderDescriptionString >
 
using SerializationMethod = Descriptor< gSizeSerializationMethodString >
 
using DataOrigin = Descriptor< gSizeDataOriginString >
 
using DataDescription = Descriptor< gSizeDataDescriptionString >
 
using RAWDataHeader = RAWDataHeaderV7
 
using RDHLowest = RAWDataHeaderV4
 
using RDHHighest = RAWDataHeaderV7
 
using LHCOrbitClock = LHCClock< std::chrono::system_clock::time_point, lhc_clock_parameter::OrbitPrecision >
 
using LHCBunchClock = LHCClock< std::chrono::system_clock::time_point, lhc_clock_parameter::BunchPrecision >
 

Functions

void hexDump (const char *desc, const void *voidaddr, size_t len, size_t max=0)
 helper function to print a hex/ASCII dump of some memory
 
template<typename T , typename... Targs>
constexpr T String2 (char c, Targs... Fargs)
 
template<typename T , std::size_t N, std::size_t pos = 0, bool suppressAssert = false>
constexpr T String2 (const char(&str)[N])
 
template<typename HeaderType , typename std::enable_if_t< std::is_pointer< HeaderType >::value, int > = 0>
auto get (const std::byte *buffer, size_t=0)
 
template<typename HeaderType , typename std::enable_if_t< std::is_pointer< HeaderType >::value, int > = 0>
auto get (const void *buffer, size_t len=0)
 
template<typename T >
strtoui (const char *str, char **str_end, int base) noexcept
 
template<typename T >
stoui (const std::string &str, size_t *pos=nullptr, int base=10)
 
 BOOST_AUTO_TEST_CASE (Descriptor_test)
 
 BOOST_AUTO_TEST_CASE (DataDescription_test)
 
 BOOST_AUTO_TEST_CASE (DataOrigin_test)
 
 BOOST_AUTO_TEST_CASE (BaseHeader_test)
 
 BOOST_AUTO_TEST_CASE (DataHeader_test)
 
 BOOST_AUTO_TEST_CASE (headerStack_test)
 
 BOOST_AUTO_TEST_CASE (Descriptor_benchmark)
 
 BOOST_AUTO_TEST_CASE (Descriptor_formatting)
 
 BOOST_AUTO_TEST_CASE (LHCClock_test)
 
 BOOST_AUTO_TEST_CASE (TimeStamp_test)
 
std::ostream & operator<< (std::ostream &os, const o2::header::RDHAny &rdh)
 
std::ostream & operator<< (std::ostream &, const o2::header::RAWDataHeaderV4 &)
 

Variables

constexpr o2::header::DataOrigin gDataOriginUnloaded {"UNL"}
 Source IDs used by DAQ.
 
constexpr uint32_t gSizeMagicString = 4
 size of the magic string field
 
constexpr uint32_t gSizeDataOriginString = 4
 size of the data origin field
 
constexpr uint32_t gSizeSerializationMethodString = 8
 size of the payload serialization field
 
constexpr uint32_t gSizeDataDescriptionString = 16
 size of the data description field
 
constexpr uint32_t gSizeHeaderDescriptionString = 8
 size of the header description field
 
const uint32_t gInvalidToken32 = 0xFFFFFFFF
 default int representation of 'invalid' token for 4-byte char field
 
const uint64_t gInvalidToken64 = 0xFFFFFFFFFFFFFFFF
 default int representation of 'invalid' token for 8-byte char field
 
constexpr o2::header::SerializationMethod gSerializationMethodAny {"*******"}
 
constexpr o2::header::SerializationMethod gSerializationMethodInvalid {"INVALID"}
 
constexpr o2::header::SerializationMethod gSerializationMethodNone {"NONE"}
 
constexpr o2::header::SerializationMethod gSerializationMethodROOT {"ROOT"}
 
constexpr o2::header::SerializationMethod gSerializationMethodCCDB {"CCDB"}
 
constexpr o2::header::SerializationMethod gSerializationMethodFlatBuf {"FLATBUF"}
 
constexpr o2::header::SerializationMethod gSerializationMethodArrow {"ARROW"}
 
constexpr o2::header::DataOrigin gDataOriginAny {"***"}
 
constexpr o2::header::DataOrigin gDataOriginInvalid {"NIL"}
 
constexpr o2::header::DataOrigin gDataOriginFLP {"FLP"}
 
constexpr o2::header::DataOrigin gDataOriginCPV {"CPV"}
 
constexpr o2::header::DataOrigin gDataOriginCTP {"CTP"}
 
constexpr o2::header::DataOrigin gDataOriginEMC {"EMC"}
 
constexpr o2::header::DataOrigin gDataOriginFT0 {"FT0"}
 
constexpr o2::header::DataOrigin gDataOriginFV0 {"FV0"}
 
constexpr o2::header::DataOrigin gDataOriginFDD {"FDD"}
 
constexpr o2::header::DataOrigin gDataOriginHMP {"HMP"}
 
constexpr o2::header::DataOrigin gDataOriginITS {"ITS"}
 
constexpr o2::header::DataOrigin gDataOriginMCH {"MCH"}
 
constexpr o2::header::DataOrigin gDataOriginMFT {"MFT"}
 
constexpr o2::header::DataOrigin gDataOriginMID {"MID"}
 
constexpr o2::header::DataOrigin gDataOriginPHS {"PHS"}
 
constexpr o2::header::DataOrigin gDataOriginTOF {"TOF"}
 
constexpr o2::header::DataOrigin gDataOriginTPC {"TPC"}
 
constexpr o2::header::DataOrigin gDataOriginTRD {"TRD"}
 
constexpr o2::header::DataOrigin gDataOriginZDC {"ZDC"}
 
constexpr o2::header::DataOrigin gDataOriginTST {"TST"}
 
constexpr o2::header::DataOrigin gDataOriginACO {"ACO"}
 
constexpr o2::header::DataOrigin gDataOriginIT3 {"IT3"}
 
constexpr o2::header::DataOrigin gDataOriginFOC {"FOC"}
 
constexpr o2::header::DataOrigin gDataOriginTRK {"TRK"}
 
constexpr o2::header::DataOrigin gDataOriginFT3 {"FT3"}
 
constexpr o2::header::DataOrigin gDataOriginFCT {"FCT"}
 
constexpr o2::header::DataOrigin gDataOriginTF3 {"TF3"}
 
constexpr o2::header::DataOrigin gDataOriginRCH {"RCH"}
 
constexpr o2::header::DataOrigin gDataOriginMI3 {"MI3"}
 
constexpr o2::header::DataOrigin gDataOriginECL {"ECL"}
 
constexpr o2::header::DataOrigin gDataOriginGPU {"GPU"}
 
constexpr o2::header::DataDescription gDataDescriptionAny {"***************"}
 
constexpr o2::header::DataDescription gDataDescriptionInvalid {"INVALID_DESC"}
 
constexpr o2::header::DataDescription gDataDescriptionRawData {"RAWDATA"}
 
constexpr o2::header::DataDescription gDataDescriptionClusters {"CLUSTERS"}
 
constexpr o2::header::DataDescription gDataDescriptionTracks {"TRACKS"}
 
constexpr o2::header::DataDescription gDataDescriptionConfig {"CONFIGURATION"}
 
constexpr o2::header::DataDescription gDataDescriptionInfo {"INFORMATION"}
 
constexpr o2::header::DataDescription gDataDescriptionROOTStreamers {"ROOT STREAMERS"}
 
constexpr o2::header::DataDescription gDataDescriptionDISTSTF {"DISTSUBTIMEFRAME"}
 
const o2::header::DataDescription gDataDescriptionHeartbeatFrame
 

Detailed Description

O2 data header classes and API, v0.1.

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.

origin: CWG4

Author
Mikolaj Krzewicki, mkrze.nosp@m.wic@.nosp@m.cern..nosp@m.ch
Matthias Richter, Matth.nosp@m.ias..nosp@m.Richt.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
David Rohr, drohr.nosp@m.@cer.nosp@m.n.ch
Laurent Aphecetche

Typedef Documentation

◆ DataDescription

◆ DataOrigin

Definition at line 550 of file DataHeader.h.

◆ HeaderType

Definition at line 321 of file DataHeader.h.

◆ LHCBunchClock

using o2::header::LHCBunchClock = typedef LHCClock<std::chrono::system_clock::time_point, lhc_clock_parameter::BunchPrecision>

Definition at line 114 of file TimeStamp.h.

◆ LHCOrbitClock

using o2::header::LHCOrbitClock = typedef LHCClock<std::chrono::system_clock::time_point, lhc_clock_parameter::OrbitPrecision>

Definition at line 113 of file TimeStamp.h.

◆ RAWDataHeader

Definition at line 524 of file RAWDataHeader.h.

◆ RDHHighest

Definition at line 526 of file RAWDataHeader.h.

◆ RDHLowest

Definition at line 525 of file RAWDataHeader.h.

◆ SerializationMethod

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/10]

o2::header::BOOST_AUTO_TEST_CASE ( BaseHeader_test  )

Definition at line 205 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [2/10]

o2::header::BOOST_AUTO_TEST_CASE ( DataDescription_test  )

Definition at line 106 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [3/10]

o2::header::BOOST_AUTO_TEST_CASE ( DataHeader_test  )

Definition at line 215 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [4/10]

o2::header::BOOST_AUTO_TEST_CASE ( DataOrigin_test  )

Definition at line 146 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [5/10]

o2::header::BOOST_AUTO_TEST_CASE ( Descriptor_benchmark  )

Definition at line 336 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [6/10]

o2::header::BOOST_AUTO_TEST_CASE ( Descriptor_formatting  )

Definition at line 355 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [7/10]

o2::header::BOOST_AUTO_TEST_CASE ( Descriptor_test  )

Definition at line 56 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [8/10]

o2::header::BOOST_AUTO_TEST_CASE ( headerStack_test  )

Definition at line 258 of file testDataHeader.cxx.

◆ BOOST_AUTO_TEST_CASE() [9/10]

o2::header::BOOST_AUTO_TEST_CASE ( LHCClock_test  )

Definition at line 24 of file testTimeStamp.cxx.

◆ BOOST_AUTO_TEST_CASE() [10/10]

o2::header::BOOST_AUTO_TEST_CASE ( TimeStamp_test  )

Definition at line 47 of file testTimeStamp.cxx.

◆ get() [1/2]

template<typename HeaderType , typename std::enable_if_t< std::is_pointer< HeaderType >::value, int > = 0>
auto o2::header::get ( const std::byte *  buffer,
size_t  = 0 
)

find a header of type HeaderType in a buffer use like this: HeaderType* h = get<HeaderType*>(buffer)

Definition at line 454 of file DataHeader.h.

◆ get() [2/2]

template<typename HeaderType , typename std::enable_if_t< std::is_pointer< HeaderType >::value, int > = 0>
auto o2::header::get ( const void buffer,
size_t  len = 0 
)

Definition at line 493 of file DataHeader.h.

◆ hexDump()

void o2::header::hexDump ( const char desc,
const void voidaddr,
size_t  len,
size_t  max = 0 
)

helper function to print a hex/ASCII dump of some memory

Definition at line 107 of file DataHeader.cxx.

◆ operator<<() [1/2]

std::ostream & o2::header::operator<< ( std::ostream &  ,
const o2::header::RAWDataHeaderV4  
)
extern

◆ operator<<() [2/2]

std::ostream & o2::header::operator<< ( std::ostream &  os,
const o2::header::RDHAny rdh 
)

Definition at line 84 of file RDHManip.cxx.

◆ stoui()

template<typename T >
T o2::header::stoui ( const std::string &  str,
size_t *  pos = nullptr,
int  base = 10 
)

Definition at line 528 of file DataHeader.h.

◆ String2() [1/2]

template<typename T , typename... Targs>
constexpr T o2::header::String2 ( char  c,
Targs...  Fargs 
)
constexpr

constexpr intializer, evaluated at compile time generic intializer for variable char argument list

Definition at line 162 of file DataHeader.h.

◆ String2() [2/2]

template<typename T , std::size_t N, std::size_t pos = 0, bool suppressAssert = false>
constexpr T o2::header::String2 ( const char(&)  str[N])
constexpr

constexpr intializer, evaluated at compile time generic initializer, convert a string to unsigned integer of different width Example usage: String2<uint64_t>("IDENTIFY")

Definition at line 180 of file DataHeader.h.

◆ strtoui()

template<typename T >
T o2::header::strtoui ( const char str,
char **  str_end,
int  base 
)
noexcept

Definition at line 503 of file DataHeader.h.

Variable Documentation

◆ gDataDescriptionHeartbeatFrame

const o2::header::DataDescription o2::header::gDataDescriptionHeartbeatFrame
extern

◆ gDataOriginUnloaded

constexpr o2::header::DataOrigin o2::header::gDataOriginUnloaded {"UNL"}
constexpr

Source IDs used by DAQ.

Definition at line 26 of file DAQID.h.

◆ gInvalidToken32

const uint32_t o2::header::gInvalidToken32 = 0xFFFFFFFF

default int representation of 'invalid' token for 4-byte char field

Definition at line 317 of file DataHeader.h.

◆ gInvalidToken64

const uint64_t o2::header::gInvalidToken64 = 0xFFFFFFFFFFFFFFFF

default int representation of 'invalid' token for 8-byte char field

Definition at line 319 of file DataHeader.h.

◆ gSerializationMethodAny

constexpr o2::header::SerializationMethod o2::header::gSerializationMethodAny {"*******"}
constexpr

Definition at line 325 of file DataHeader.h.

◆ gSerializationMethodArrow

constexpr o2::header::SerializationMethod o2::header::gSerializationMethodArrow {"ARROW"}
constexpr

Definition at line 331 of file DataHeader.h.

◆ gSerializationMethodCCDB

constexpr o2::header::SerializationMethod o2::header::gSerializationMethodCCDB {"CCDB"}
constexpr

Definition at line 329 of file DataHeader.h.

◆ gSerializationMethodFlatBuf

constexpr o2::header::SerializationMethod o2::header::gSerializationMethodFlatBuf {"FLATBUF"}
constexpr

Definition at line 330 of file DataHeader.h.

◆ gSerializationMethodInvalid

constexpr o2::header::SerializationMethod o2::header::gSerializationMethodInvalid {"INVALID"}
constexpr

Definition at line 326 of file DataHeader.h.

◆ gSerializationMethodNone

constexpr o2::header::SerializationMethod o2::header::gSerializationMethodNone {"NONE"}
constexpr

Definition at line 327 of file DataHeader.h.

◆ gSerializationMethodROOT

constexpr o2::header::SerializationMethod o2::header::gSerializationMethodROOT {"ROOT"}
constexpr

Definition at line 328 of file DataHeader.h.