CGEM BOSS 6.6.5.h
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
 
- Public Member Functions inherited from eformat::old::Header
 Header (const uint32_t *it, uint32_t match)
 
virtual ~Header ()
 
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 old/ROBFragment.h.

Constructor & Destructor Documentation

◆ ROBFragment()

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.

20 m_start(specific_header())
21{
22}
const uint32_t * specific_header(void) const
Definition old/Header.h:130
@ ROB
The ROB marker.

◆ ~ROBFragment()

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

Destructor virtualisation

Definition at line 43 of file old/ROBFragment.h.

43{}

Member Function Documentation

◆ bc_id()

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

Returns the bunch crossing identifier

Definition at line 63 of file old/ROBFragment.h.

63{ return m_start[1]; }

◆ check()

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
uint32_t nspecific() const
Definition old/Header.h:123

◆ check_tree()

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 * offset(void) const
Definition old/Header.h:116
uint32_t fragment_size_word() const
Definition old/Header.h:72
const uint32_t * child(size_t n) const
Definition Header24.cxx:39
uint32_t noffset() const
Definition old/Header.h:110
uint32_t header_size_word() const
Definition old/Header.h:78
virtual bool check() const

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

◆ detev_type()

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

Returns the detector event type

Definition at line 73 of file old/ROBFragment.h.

73{ return m_start[3]; }

◆ lvl1_id()

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

Returns the lvl1 identifier

Definition at line 58 of file old/ROBFragment.h.

58{ return m_start[0]; }

◆ lvl1_trigger_type()

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

Returns the lvl1 trigger type

Definition at line 68 of file old/ROBFragment.h.

68{ return m_start[2]; }

◆ rod()

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().


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