BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::old::ROBFragment Class Reference

#include <ROBFragment.h>

+ Inheritance diagram for eformat::old::ROBFragment:

Public Member Functions

 ROBFragment (const uint32_t *it)
 
virtual ~ROBFragment ()
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t lvl1_id () const
 
uint32_t bc_id () const
 
uint32_t lvl1_trigger_type () const
 
uint32_t detev_type () const
 
eformat::old::RODFragment rod (size_t n) const
 
 ROBFragment (const uint32_t *it)
 
virtual ~ROBFragment ()
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t lvl1_id () const
 
uint32_t bc_id () const
 
uint32_t lvl1_trigger_type () const
 
uint32_t detev_type () const
 
eformat::old::RODFragment rod (size_t n) const
 
- Public Member Functions inherited from eformat::old::Header
 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

Describes how to access the contents of a subdetector fragment, as prescribed by the event format note.

Definition at line 28 of file Event/eformat/eformat-00-00-04/eformat/old/ROBFragment.h.

Constructor & Destructor Documentation

◆ ROBFragment() [1/2]

eformat::old::ROBFragment::ROBFragment ( const uint32_t *  it)

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

Parameters
itThe exact position where this fragment should start.

Definition at line 18 of file ROBFragment24.cxx.

◆ ~ROBFragment() [1/2]

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

Destructor virtualisation

Definition at line 43 of file Event/eformat/eformat-00-00-04/eformat/old/ROBFragment.h.

43{}

◆ ROBFragment() [2/2]

eformat::old::ROBFragment::ROBFragment ( const uint32_t *  it)

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

Parameters
itThe exact position where this fragment should start.

◆ ~ROBFragment() [2/2]

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

Destructor virtualisation

Definition at line 43 of file InstallArea/include/eformat/eformat/old/ROBFragment.h.

43{}

Member Function Documentation

◆ bc_id() [1/2]

uint32_t eformat::old::ROBFragment::bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 63 of file Event/eformat/eformat-00-00-04/eformat/old/ROBFragment.h.

63{ return m_start[1]; }

◆ bc_id() [2/2]

uint32_t eformat::old::ROBFragment::bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 63 of file InstallArea/include/eformat/eformat/old/ROBFragment.h.

63{ return m_start[1]; }

◆ check() [1/2]

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

Says if the the fragment is valid. This may throw exceptions.

Reimplemented from eformat::old::Header.

Definition at line 24 of file ROBFragment24.cxx.

25{
26 eformat::old::Header::check(); //< first do a generic check
27 if (nspecific() != 4) throw EFORMAT_SIZE_CHECK(4, nspecific());
28 return true;
29}
#define EFORMAT_SIZE_CHECK(actual, informed)
virtual bool check() const
Definition: Header24.cxx:29

◆ check() [2/2]

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

Says if the the fragment is valid. This may throw exceptions.

Reimplemented from eformat::old::Header.

◆ check_tree() [1/2]

bool eformat::old::ROBFragment::check_tree ( ) const

Says if the the fragment is valid. This may throw exceptions.

Definition at line 31 of file ROBFragment24.cxx.

32{
33 check(); // check myself
34 for (size_t i=0; i<noffset(); ++i) {
35 size_t rod_size = 0;
36 //typical
37 if (noffset() == 1) rod_size = fragment_size_word() - header_size_word();
38 else { //more atypical, have to calculate
39 if (i != noffset() - 1) rod_size = (0xffffff & offset()[i+1]);
40 else rod_size = fragment_size_word();
41 rod_size -= (0xffffff & offset()[i]);
42 }
43 eformat::old::RODFragment f(child(i), rod_size);
44 f.check();
45 }
46 return true;
47}
const uint32_t * child(size_t n) const
Definition: Header24.cxx:39
virtual bool check() const

Referenced by eformat::old::ROSFragment::check_tree().

◆ check_tree() [2/2]

bool eformat::old::ROBFragment::check_tree ( ) const

Says if the the fragment is valid. This may throw exceptions.

◆ detev_type() [1/2]

uint32_t eformat::old::ROBFragment::detev_type ( ) const
inline

Returns the detector event type

Definition at line 73 of file Event/eformat/eformat-00-00-04/eformat/old/ROBFragment.h.

73{ return m_start[3]; }

◆ detev_type() [2/2]

uint32_t eformat::old::ROBFragment::detev_type ( ) const
inline

Returns the detector event type

Definition at line 73 of file InstallArea/include/eformat/eformat/old/ROBFragment.h.

73{ return m_start[3]; }

◆ lvl1_id() [1/2]

uint32_t eformat::old::ROBFragment::lvl1_id ( ) const
inline

Returns the lvl1 identifier

Definition at line 58 of file Event/eformat/eformat-00-00-04/eformat/old/ROBFragment.h.

58{ return m_start[0]; }

◆ lvl1_id() [2/2]

uint32_t eformat::old::ROBFragment::lvl1_id ( ) const
inline

Returns the lvl1 identifier

Definition at line 58 of file InstallArea/include/eformat/eformat/old/ROBFragment.h.

58{ return m_start[0]; }

◆ lvl1_trigger_type() [1/2]

uint32_t eformat::old::ROBFragment::lvl1_trigger_type ( ) const
inline

Returns the lvl1 trigger type

Definition at line 68 of file Event/eformat/eformat-00-00-04/eformat/old/ROBFragment.h.

68{ return m_start[2]; }

◆ lvl1_trigger_type() [2/2]

uint32_t eformat::old::ROBFragment::lvl1_trigger_type ( ) const
inline

Returns the lvl1 trigger type

Definition at line 68 of file InstallArea/include/eformat/eformat/old/ROBFragment.h.

68{ return m_start[2]; }

◆ rod() [1/2]

eformat::old::RODFragment eformat::old::ROBFragment::rod ( 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 49 of file ROBFragment24.cxx.

50{
51 check();
52 size_t rod_size = 0;
53 //typical
54 if (noffset() == 1)
55 rod_size = fragment_size_word() - header_size_word();
56 else { //more atypical, have to calculate
57 if (n != noffset() - 1) rod_size = (0xffffff & offset()[n+1]);
58 else rod_size = fragment_size_word();
59 rod_size -= (0xffffff & offset()[n]);
60 }
61 eformat::old::RODFragment f(child(n), rod_size);
62 f.check();
63 return f;
64}
const Int_t n

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

◆ rod() [2/2]

eformat::old::RODFragment eformat::old::ROBFragment::rod ( 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.

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