BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::old::Header Class Reference

#include <Header.h>

Inheritance diagram for eformat::old::Header:

Public Member Functions

 Header (const uint32_t *it, uint32_t match)
virtual ~Header ()
virtual bool check () const
uint32_t marker () const
uint32_t fragment_size_word () const
uint32_t header_size_word () const
uint32_t version () const
uint32_t source_id () const
uint32_t run_no () const
uint32_t nstatus () const
const uint32_t * status () const
uint32_t noffset () const
const uint32_t * offset (void) const
uint32_t nspecific () const
const uint32_t * specific_header (void) const
const uint32_t * child (size_t n) const
 Header (const uint32_t *it, uint32_t match)
virtual ~Header ()
virtual bool check () const
uint32_t marker () const
uint32_t fragment_size_word () const
uint32_t header_size_word () const
uint32_t version () const
uint32_t source_id () const
uint32_t run_no () const
uint32_t nstatus () const
const uint32_t * status () const
uint32_t noffset () const
const uint32_t * offset (void) const
uint32_t nspecific () const
const uint32_t * specific_header (void) const
const uint32_t * child (size_t n) const
 Header (const uint32_t *it, uint32_t match)
virtual ~Header ()
virtual bool check () const
uint32_t marker () const
uint32_t fragment_size_word () const
uint32_t header_size_word () const
uint32_t version () const
uint32_t source_id () const
uint32_t run_no () const
uint32_t nstatus () const
const uint32_t * status () const
uint32_t noffset () const
const uint32_t * offset (void) const
uint32_t nspecific () const
const uint32_t * specific_header (void) const
const uint32_t * child (size_t n) const

Detailed Description

Contains the information on the Header of a fragment as described by the original note. The header is a composite entity, build from two parts:

  1. The generic part, containing the header type, size and version information;
  2. The specific part, containing data that is specific for a particular fragment.

Definition at line 40 of file Event/eformat/include/eformat/old/Header.h.

Constructor & Destructor Documentation

◆ Header() [1/3]

eformat::old::Header::Header ( const uint32_t * it,
uint32_t match )

To build a header given the containing buffer. I need to know where the header starts in order to do that.

Parameters
itThe exact position where this header should start.
matchThe word that this header should match.

Definition at line 21 of file Header24.cxx.

21 : m_start( it ) {
22 // get endiannesso
23 uint32_t m = marker();
24 if ( m != match ) throw EFORMAT_WRONG_MARKER( m, match );
25}
#define EFORMAT_WRONG_MARKER(current, expected)

Referenced by eformat::old::FullEventFragment::FullEventFragment(), eformat::old::ROBFragment::ROBFragment(), eformat::old::ROSFragment::ROSFragment(), and eformat::old::SubDetectorFragment::SubDetectorFragment().

◆ ~Header() [1/3]

virtual eformat::old::Header::~Header ( )
inlinevirtual

Destructor virtualisation

Definition at line 55 of file Event/eformat/include/eformat/old/Header.h.

55{}

◆ Header() [2/3]

eformat::old::Header::Header ( const uint32_t * it,
uint32_t match )

To build a header given the containing buffer. I need to know where the header starts in order to do that.

Parameters
itThe exact position where this header should start.
matchThe word that this header should match.

◆ ~Header() [2/3]

virtual eformat::old::Header::~Header ( )
inlinevirtual

Destructor virtualisation

Definition at line 55 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

55{}

◆ Header() [3/3]

eformat::old::Header::Header ( const uint32_t * it,
uint32_t match )

To build a header given the containing buffer. I need to know where the header starts in order to do that.

Parameters
itThe exact position where this header should start.
matchThe word that this header should match.

◆ ~Header() [3/3]

virtual eformat::old::Header::~Header ( )
inlinevirtual

Destructor virtualisation

Definition at line 55 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

55{}

Member Function Documentation

◆ check() [1/3]

bool eformat::old::Header::check ( ) const
virtual

Says if the generic part of the header is valid. This may throw exceptions.

Reimplemented in eformat::old::FullEventFragment, eformat::old::FullEventFragment, eformat::old::FullEventFragment, eformat::old::ROBFragment, eformat::old::ROBFragment, eformat::old::ROBFragment, eformat::old::ROSFragment, eformat::old::ROSFragment, eformat::old::ROSFragment, eformat::old::SubDetectorFragment, eformat::old::SubDetectorFragment, and eformat::old::SubDetectorFragment.

Definition at line 27 of file Header24.cxx.

Referenced by eformat::old::FullEventFragment::check(), eformat::old::ROBFragment::check(), eformat::old::ROSFragment::check(), and eformat::old::SubDetectorFragment::check().

◆ check() [2/3]

◆ check() [3/3]

◆ child() [1/3]

const uint32_t * eformat::old::Header::child ( size_t n) const

Returns the nth child fragment. If the nth fragment doesn't exist, an exception is thrown.

Parameters
nThe fragment position, starting at zero, of the child fragment you would like to get.

Definition at line 36 of file Header24.cxx.

36 {
37 if ( n >= noffset() ) throw EFORMAT_NO_SUCH_CHILD( n, noffset() );
38 return &m_start[0xffffff & offset()[n]];
39}
const Int_t n
#define EFORMAT_NO_SUCH_CHILD(req, total)

Referenced by eformat::old::FullEventFragment::check_tree(), eformat::old::ROBFragment::check_tree(), eformat::old::ROSFragment::check_tree(), eformat::old::SubDetectorFragment::check_tree(), eformat::old::convert(), convert_ros(), and eformat::old::ROBFragment::rod().

◆ child() [2/3]

const uint32_t * eformat::old::Header::child ( size_t n) const

Returns the nth child fragment. If the nth fragment doesn't exist, an exception is thrown.

Parameters
nThe fragment position, starting at zero, of the child fragment you would like to get.

◆ child() [3/3]

const uint32_t * eformat::old::Header::child ( size_t n) const

Returns the nth child fragment. If the nth fragment doesn't exist, an exception is thrown.

Parameters
nThe fragment position, starting at zero, of the child fragment you would like to get.

◆ fragment_size_word() [1/3]

uint32_t eformat::old::Header::fragment_size_word ( ) const
inline

Returns the size, in words, of the current fragment.

Definition at line 71 of file Event/eformat/include/eformat/old/Header.h.

71{ return m_start[1]; }

Referenced by eformat::old::ROBFragment::check_tree(), and eformat::old::ROBFragment::rod().

◆ fragment_size_word() [2/3]

uint32_t eformat::old::Header::fragment_size_word ( ) const
inline

Returns the size, in words, of the current fragment.

Definition at line 71 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

71{ return m_start[1]; }

◆ fragment_size_word() [3/3]

uint32_t eformat::old::Header::fragment_size_word ( ) const
inline

Returns the size, in words, of the current fragment.

Definition at line 71 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

71{ return m_start[1]; }

◆ header_size_word() [1/3]

uint32_t eformat::old::Header::header_size_word ( ) const
inline

Returns the size, in words, of the current header. That does include the specific part of the header.

Definition at line 77 of file Event/eformat/include/eformat/old/Header.h.

77{ return m_start[2]; }

Referenced by check(), eformat::old::ROBFragment::check_tree(), and eformat::old::ROBFragment::rod().

◆ header_size_word() [2/3]

uint32_t eformat::old::Header::header_size_word ( ) const
inline

Returns the size, in words, of the current header. That does include the specific part of the header.

Definition at line 77 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

77{ return m_start[2]; }

◆ header_size_word() [3/3]

uint32_t eformat::old::Header::header_size_word ( ) const
inline

Returns the size, in words, of the current header. That does include the specific part of the header.

Definition at line 77 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

77{ return m_start[2]; }

◆ marker() [1/3]

uint32_t eformat::old::Header::marker ( ) const
inline

Returns the fragment type.

Definition at line 66 of file Event/eformat/include/eformat/old/Header.h.

66{ return m_start[0]; }

Referenced by Header().

◆ marker() [2/3]

uint32_t eformat::old::Header::marker ( ) const
inline

Returns the fragment type.

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

66{ return m_start[0]; }

◆ marker() [3/3]

uint32_t eformat::old::Header::marker ( ) const
inline

Returns the fragment type.

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

66{ return m_start[0]; }

◆ noffset() [1/3]

uint32_t eformat::old::Header::noffset ( ) const
inline

Returns the number of offset words available. This will also determine the number of child fragments available to this super-fragment.

Definition at line 109 of file Event/eformat/include/eformat/old/Header.h.

109{ return m_start[7 + nstatus()]; }

Referenced by check(), eformat::old::FullEventFragment::check_tree(), eformat::old::ROBFragment::check_tree(), eformat::old::ROSFragment::check_tree(), eformat::old::SubDetectorFragment::check_tree(), child(), eformat::old::convert(), convert_ros(), nspecific(), eformat::old::ROBFragment::rod(), and specific_header().

◆ noffset() [2/3]

uint32_t eformat::old::Header::noffset ( ) const
inline

Returns the number of offset words available. This will also determine the number of child fragments available to this super-fragment.

Definition at line 109 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

109{ return m_start[7 + nstatus()]; }

◆ noffset() [3/3]

uint32_t eformat::old::Header::noffset ( ) const
inline

Returns the number of offset words available. This will also determine the number of child fragments available to this super-fragment.

Definition at line 109 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

109{ return m_start[7 + nstatus()]; }

◆ nspecific() [1/3]

uint32_t eformat::old::Header::nspecific ( ) const
inline

Returns the number of specific words available in the specific header part

Definition at line 121 of file Event/eformat/include/eformat/old/Header.h.

121{ return m_start[8 + nstatus() + noffset()]; }

Referenced by eformat::old::FullEventFragment::check(), check(), eformat::old::ROBFragment::check(), eformat::old::ROSFragment::check(), and eformat::old::SubDetectorFragment::check().

◆ nspecific() [2/3]

uint32_t eformat::old::Header::nspecific ( ) const
inline

Returns the number of specific words available in the specific header part

Definition at line 121 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

121{ return m_start[8 + nstatus() + noffset()]; }

◆ nspecific() [3/3]

uint32_t eformat::old::Header::nspecific ( ) const
inline

Returns the number of specific words available in the specific header part

Definition at line 121 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

121{ return m_start[8 + nstatus() + noffset()]; }

◆ nstatus() [1/3]

uint32_t eformat::old::Header::nstatus ( ) const
inline

Returns the number of status words available

Definition at line 97 of file Event/eformat/include/eformat/old/Header.h.

97{ return m_start[6]; }

Referenced by check(), eformat::old::convert(), convert_ros(), noffset(), nspecific(), offset(), and specific_header().

◆ nstatus() [2/3]

uint32_t eformat::old::Header::nstatus ( ) const
inline

Returns the number of status words available

Definition at line 97 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

97{ return m_start[6]; }

◆ nstatus() [3/3]

uint32_t eformat::old::Header::nstatus ( ) const
inline

Returns the number of status words available

Definition at line 97 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

97{ return m_start[6]; }

◆ offset() [1/3]

const uint32_t * eformat::old::Header::offset ( void ) const
inline

Returns the offset words, as an iterator to the offset words available.

Definition at line 115 of file Event/eformat/include/eformat/old/Header.h.

115{ return &m_start[8 + nstatus()]; }

Referenced by eformat::old::ROBFragment::check_tree(), child(), and eformat::old::ROBFragment::rod().

◆ offset() [2/3]

const uint32_t * eformat::old::Header::offset ( void ) const
inline

Returns the offset words, as an iterator to the offset words available.

Definition at line 115 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

115{ return &m_start[8 + nstatus()]; }

◆ offset() [3/3]

const uint32_t * eformat::old::Header::offset ( void ) const
inline

Returns the offset words, as an iterator to the offset words available.

Definition at line 115 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

115{ return &m_start[8 + nstatus()]; }

◆ run_no() [1/3]

uint32_t eformat::old::Header::run_no ( ) const
inline

Returns the current run number.

Definition at line 92 of file Event/eformat/include/eformat/old/Header.h.

92{ return m_start[5]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ run_no() [2/3]

uint32_t eformat::old::Header::run_no ( ) const
inline

Returns the current run number.

Definition at line 92 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

92{ return m_start[5]; }

◆ run_no() [3/3]

uint32_t eformat::old::Header::run_no ( ) const
inline

Returns the current run number.

Definition at line 92 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

92{ return m_start[5]; }

◆ source_id() [1/3]

uint32_t eformat::old::Header::source_id ( ) const
inline

Returns the full source identifier.

Definition at line 87 of file Event/eformat/include/eformat/old/Header.h.

87{ return m_start[4]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ source_id() [2/3]

uint32_t eformat::old::Header::source_id ( ) const
inline

Returns the full source identifier.

Definition at line 87 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

87{ return m_start[4]; }

◆ source_id() [3/3]

uint32_t eformat::old::Header::source_id ( ) const
inline

Returns the full source identifier.

Definition at line 87 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

87{ return m_start[4]; }

◆ specific_header() [1/3]

const uint32_t * eformat::old::Header::specific_header ( void ) const
inline

Returns an iterator to the start of the specific header part (this includes the number of specific header fragments)

Definition at line 127 of file Event/eformat/include/eformat/old/Header.h.

127 {
128 return &m_start[9 + nstatus() + noffset()];
129 }

Referenced by eformat::old::FullEventFragment::FullEventFragment(), eformat::old::ROBFragment::ROBFragment(), eformat::old::ROSFragment::ROSFragment(), and eformat::old::SubDetectorFragment::SubDetectorFragment().

◆ specific_header() [2/3]

const uint32_t * eformat::old::Header::specific_header ( void ) const
inline

Returns an iterator to the start of the specific header part (this includes the number of specific header fragments)

Definition at line 127 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

127 {
128 return &m_start[9 + nstatus() + noffset()];
129 }

◆ specific_header() [3/3]

const uint32_t * eformat::old::Header::specific_header ( void ) const
inline

Returns an iterator to the start of the specific header part (this includes the number of specific header fragments)

Definition at line 127 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

127 {
128 return &m_start[9 + nstatus() + noffset()];
129 }

◆ status() [1/3]

const uint32_t * eformat::old::Header::status ( ) const
inline

Returns the status words, as an iterator to the status words available.

Definition at line 103 of file Event/eformat/include/eformat/old/Header.h.

103{ return &m_start[7]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ status() [2/3]

const uint32_t * eformat::old::Header::status ( ) const
inline

Returns the status words, as an iterator to the status words available.

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

103{ return &m_start[7]; }

◆ status() [3/3]

const uint32_t * eformat::old::Header::status ( ) const
inline

Returns the status words, as an iterator to the status words available.

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

103{ return &m_start[7]; }

◆ version() [1/3]

uint32_t eformat::old::Header::version ( ) const
inline

Returns the formatting version.

Definition at line 82 of file Event/eformat/include/eformat/old/Header.h.

82{ return m_start[3]; }

Referenced by check(), eformat::old::convert(), convert_ros(), and main().

◆ version() [2/3]

uint32_t eformat::old::Header::version ( ) const
inline

Returns the formatting version.

Definition at line 82 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/Header.h.

82{ return m_start[3]; }

◆ version() [3/3]

uint32_t eformat::old::Header::version ( ) const
inline

Returns the formatting version.

Definition at line 82 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/Header.h.

82{ return m_start[3]; }

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