CGEM BOSS 6.6.5.f
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
 

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/eformat-00-00-04/eformat/old/Header.h.

Constructor & Destructor Documentation

◆ Header() [1/2]

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.

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

◆ ~Header() [1/2]

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

Destructor virtualisation

Definition at line 56 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

56{}

◆ Header() [2/2]

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/2]

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

Destructor virtualisation

Definition at line 56 of file InstallArea/include/eformat/eformat/old/Header.h.

56{}

Member Function Documentation

◆ check() [1/2]

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::ROBFragment, eformat::old::ROSFragment, eformat::old::SubDetectorFragment, eformat::old::FullEventFragment, eformat::old::ROBFragment, eformat::old::ROSFragment, and eformat::old::SubDetectorFragment.

Definition at line 29 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/2]

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

◆ child() [1/2]

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 39 of file Header24.cxx.

40{
41 if (n >= noffset()) throw EFORMAT_NO_SUCH_CHILD(n, noffset());
42 return &m_start[0xffffff & offset()[n]];
43}
const Int_t n

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

◆ child() [2/2]

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/2]

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

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

Definition at line 72 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

72{ return m_start[1]; }

◆ fragment_size_word() [2/2]

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

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

Definition at line 72 of file InstallArea/include/eformat/eformat/old/Header.h.

72{ return m_start[1]; }

◆ header_size_word() [1/2]

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 78 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

78{ return m_start[2]; }

◆ header_size_word() [2/2]

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 78 of file InstallArea/include/eformat/eformat/old/Header.h.

78{ return m_start[2]; }

◆ marker() [1/2]

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

Returns the fragment type.

Definition at line 67 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

67{ return m_start[0]; }

Referenced by Header().

◆ marker() [2/2]

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

Returns the fragment type.

Definition at line 67 of file InstallArea/include/eformat/eformat/old/Header.h.

67{ return m_start[0]; }

◆ noffset() [1/2]

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 110 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

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

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

◆ noffset() [2/2]

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 110 of file InstallArea/include/eformat/eformat/old/Header.h.

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

◆ nspecific() [1/2]

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

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

Definition at line 123 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

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

◆ nspecific() [2/2]

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

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

Definition at line 123 of file InstallArea/include/eformat/eformat/old/Header.h.

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

◆ nstatus() [1/2]

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

Returns the number of status words available

Definition at line 98 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

98{ return m_start[6]; }

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

◆ nstatus() [2/2]

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

Returns the number of status words available

Definition at line 98 of file InstallArea/include/eformat/eformat/old/Header.h.

98{ return m_start[6]; }

◆ offset() [1/2]

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 116 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

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

◆ offset() [2/2]

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 116 of file InstallArea/include/eformat/eformat/old/Header.h.

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

◆ run_no() [1/2]

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

Returns the current run number.

Definition at line 93 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

93{ return m_start[5]; }

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

◆ run_no() [2/2]

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

Returns the current run number.

Definition at line 93 of file InstallArea/include/eformat/eformat/old/Header.h.

93{ return m_start[5]; }

◆ source_id() [1/2]

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

Returns the full source identifier.

Definition at line 88 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

88{ return m_start[4]; }

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

◆ source_id() [2/2]

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

Returns the full source identifier.

Definition at line 88 of file InstallArea/include/eformat/eformat/old/Header.h.

88{ return m_start[4]; }

◆ specific_header() [1/2]

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 130 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

131 { return &m_start[9 + nstatus() + noffset()]; }

◆ specific_header() [2/2]

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 130 of file InstallArea/include/eformat/eformat/old/Header.h.

131 { return &m_start[9 + nstatus() + noffset()]; }

◆ status() [1/2]

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

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

Definition at line 104 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

104{ return &m_start[7]; }

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

◆ status() [2/2]

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

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

Definition at line 104 of file InstallArea/include/eformat/eformat/old/Header.h.

104{ return &m_start[7]; }

◆ version() [1/2]

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

Returns the formatting version.

Definition at line 83 of file Event/eformat/eformat-00-00-04/eformat/old/Header.h.

83{ return m_start[3]; }

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

◆ version() [2/2]

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

Returns the formatting version.

Definition at line 83 of file InstallArea/include/eformat/eformat/old/Header.h.

83{ return m_start[3]; }

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