ATLAS Offline Software
Loading...
Searching...
No Matches
offline_eformat::v40::ROBFragment Class Reference

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

#include <v40_ROBFragment.h>

Inheritance diagram for offline_eformat::v40::ROBFragment:
Collaboration diagram for offline_eformat::v40::ROBFragment:

Public Member Functions

 ROBFragment (const uint32_t *it)
 To build a fragment given the containing buffer.
 ROBFragment (const ROBFragment &other)
 Copy constructor.
 ROBFragment ()
 Builds an empty, otherwise useless ROBFragment.
 ROBFragment (const eformat::helper::u32list &blob)
 Constructor that only works with T=<real pointer>.
 ROBFragment (const eformat::helper::u32slice &blob)
 Constructor that only works with T=<real pointer>.
virtual ~ROBFragment ()
 Destructor virtualisation.
ROBFragmentoperator= (const ROBFragment &other)
 Assignment.
ROBFragmentassign (const uint32_t *it)
 Manual re-assignment.
bool check_rob (const uint16_t version=eformat::MAJOR_V40_VERSION) const
 Says if the ROB fragment is valid.
bool check_rob_noex (const uint16_t version=eformat::MAJOR_V40_VERSION) const
 Says if the ROB fragment is valid.
bool check_rob_impl (const uint16_t version=eformat::MAJOR_V40_VERSION, const bool exc=true) const
 Says if the ROB fragment is valid.
bool check_rod_noex (const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Says if the underlying ROD fragment is valid.
bool check_rod (const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Says if the underlying ROD fragment is valid.
bool check_rod_impl (const uint16_t rod_version=eformat::MAJOR_V31_VERSION, const bool exc=true) const
 Says if the underlying ROD fragmentis valid.
bool check (const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Says if the fragment is valid.
bool check_noex (const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Says if the fragment is valid.
bool check_impl (const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION, const bool exc=true) const
 Says if the fragment is valid.
void problems (std::vector< eformat::FragmentProblem > &p, const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Tells which problemS the current fragment has.
void rob_problems (std::vector< eformat::FragmentProblem > &p, const uint16_t version=eformat::MAJOR_V40_VERSION) const
 Tells which problemS the current ROB fragment has.
void rod_problems (std::vector< eformat::FragmentProblem > &p, const uint16_t version=eformat::MAJOR_V31_VERSION) const
 Tells which problemS the underlying ROD fragment has.
uint32_t rob_source_id () const
 Gets the source_id of the ROB fragment itself.
const uint32_t * rod_start () const
 Sets the given pointer to the ROD fragment start.
void rod_start (const uint32_t *&it) const
uint32_t rod_marker () const
 Returns the fragment type.
uint32_t rod_fragment_size_word () const
 Returns the total fragment size.
uint32_t rod_header_size_word () const
 Returns the size, in words, of the current header.
uint32_t rod_trailer_size_word () const
 Returns the size, in words, of the trailer.
uint32_t rod_version () const
 Returns the formatting version for the ROD fragment.
uint32_t rod_source_id () const
 Returns the source identifier of the ROD fragment.
uint32_t rod_run_no () const
 Returns the current run number.
uint32_t rod_lvl1_id () const
 Returns the lvl1 identifier.
uint32_t rod_bc_id () const
 Returns the bunch crossing identifier.
uint32_t rod_lvl1_trigger_type () const
 Returns the lvl1 trigger type.
uint32_t rod_detev_type () const
 Returns the detector event type.
uint32_t rod_nstatus () const
 Returns the number of status words available.
const uint32_t * rod_status () const
 Returns the status words, as an iterator to the status words available.
void rod_status (const uint32_t *&it) const
uint32_t rod_ndata () const
 Returns the number of data words available.
const uint32_t * rod_data () const
 Returns a pointer to the first data word.
void rod_data (const uint32_t *&it) const
uint32_t rod_status_position () const
 Returns the status block position.
virtual uint32_t nchildren () const
 Returns the number of children available.
const uint32_t * child (size_t n) const
 Returns the nth child fragment.
virtual void child (const uint32_t *&p, size_t n) const
virtual uint32_t children (const uint32_t **p, size_t max) const
 Returns all the children of this fragment.
void throws (bool b)
 If you set this parameter, objects of this type will throw exceptions.
bool throws () const
 Says if we are supposed to throw exceptions or not.
uint32_t marker () const
 Returns the fragment type.
uint32_t fragment_size_word () const
 Returns the size, in words, of the current fragment.
uint32_t header_size_word () const
 Returns the size, in words, of the current header.
uint32_t version () const
 Returns the formatting version.
uint32_t source_id () const
 Returns the full source identifier.
uint32_t nstatus () const
 Returns the number of status words available.
const uint32_t * start () const
 Sets the pointer to my start.
void start (const uint32_t *&it) const
const uint32_t * payload () const
 Sets the pointer to where the payload starts.
void payload (const uint32_t *&it) const
const uint32_t * end () const
 Sets the pointer to one-past my end position.
void end (const uint32_t *&it) const
uint32_t payload_size_word (void) const
 Returns the payload size.
const uint32_t * status () const
 Returns the status words, as an iterator to the status words available.
void status (const uint32_t *&it) const
uint32_t checksum_type () const
 Returns the check-sum type entry.
uint32_t nspecific () const
 Returns the number of specific words available in the specific header part.
const uint32_t * specific_header () const
 Returns an iterator to the start of the specific header part.
void specific_header (const uint32_t *&it) const
uint32_t checksum_value (void) const
 Access the check sum value of this fragment, if any.
uint32_t eval_checksum (void) const
 Evaluates the current (supposed) checksum for this fragment, taking into consideration the current setting for the checksum type.
bool checksum (void) const
 This will actually re-calculate the checksum and verify that the payload of the current fragment matches that.

Private Attributes

const uint32_t * m_start
 my one-after-the-last word
const uint32_t * m_top
 < representation

Detailed Description

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

Definition at line 35 of file v40_ROBFragment.h.

Constructor & Destructor Documentation

◆ ROBFragment() [1/5]

offline_eformat::v40::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 16 of file v40_ROBFragment.cxx.

17 : Header(it),
18 m_start()
19{
21}
const uint32_t * specific_header() const
Returns an iterator to the start of the specific header part.
Header()
Builds an empty, otherwise useless Header.
const uint32_t * m_start
my one-after-the-last word

◆ ROBFragment() [2/5]

offline_eformat::v40::ROBFragment::ROBFragment ( const ROBFragment & other)

Copy constructor.

Parameters
otherThe fragment to be copied

Definition at line 23 of file v40_ROBFragment.cxx.

25 : Header(other), m_start(other.m_start)
26{
27}

◆ ROBFragment() [3/5]

offline_eformat::v40::ROBFragment::ROBFragment ( )

Builds an empty, otherwise useless ROBFragment.

Definition at line 29 of file v40_ROBFragment.cxx.

30 : Header(), m_start()
31{
32}

◆ ROBFragment() [4/5]

offline_eformat::v40::ROBFragment::ROBFragment ( const eformat::helper::u32list & blob)

Constructor that only works with T=<real pointer>.

This constructor is pretty much like the one with the pointer, but it will fetch the pointer from the u32 blob. It is only used in the python bindings.

Parameters
blobThe blob which contains the block of data this fragment is in.

Definition at line 34 of file v40_ROBFragment.cxx.

◆ ROBFragment() [5/5]

offline_eformat::v40::ROBFragment::ROBFragment ( const eformat::helper::u32slice & blob)

Constructor that only works with T=<real pointer>.

This constructor is pretty much like the one with the pointer, but it will fetch the pointer from the u32 blob. It is only used in the python bindings.

Parameters
blobThe blob which contains the block of data this fragment is in.

Definition at line 41 of file v40_ROBFragment.cxx.

42 : Header(blob.ptr()),
43 m_start()
44{
46}

◆ ~ROBFragment()

offline_eformat::v40::ROBFragment::~ROBFragment ( )
virtual

Destructor virtualisation.

Definition at line 48 of file v40_ROBFragment.cxx.

49{
50}

Member Function Documentation

◆ assign()

offline_eformat::v40::ROBFragment & offline_eformat::v40::ROBFragment::assign ( const uint32_t * it)

Manual re-assignment.

Parameters
itThe position pointing the first word of this fragment

Definition at line 63 of file v40_ROBFragment.cxx.

64{
67 return *this;
68}
Header & assign(const uint32_t *it)
Reassign this header.

◆ check()

bool offline_eformat::v40::ROBFragment::check ( const uint16_t version = eformat::MAJOR_V40_VERSION,
const uint16_t rod_version = eformat::MAJOR_V31_VERSION ) const

Says if the fragment is valid.

This method will throw exceptions.

Definition at line 174 of file v40_ROBFragment.cxx.

176{
177 return this->check_impl(version, rod_version, true);
178}
uint32_t version() const
Returns the formatting version.
uint32_t rod_version() const
Returns the formatting version for the ROD fragment.
bool check_impl(const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION, const bool exc=true) const
Says if the fragment is valid.

◆ check_impl()

bool offline_eformat::v40::ROBFragment::check_impl ( const uint16_t version = eformat::MAJOR_V40_VERSION,
const uint16_t rod_version = eformat::MAJOR_V31_VERSION,
const bool exc = true ) const

Says if the fragment is valid.

Exception behaviour is controllable.

Definition at line 157 of file v40_ROBFragment.cxx.

161{
162 return this->check_rob_impl(version, exc) &&
163 this->check_rod_impl(rod_version, exc);
164}
bool check_rod_impl(const uint16_t rod_version=eformat::MAJOR_V31_VERSION, const bool exc=true) const
Says if the underlying ROD fragmentis valid.
bool check_rob_impl(const uint16_t version=eformat::MAJOR_V40_VERSION, const bool exc=true) const
Says if the ROB fragment is valid.

◆ check_noex()

bool offline_eformat::v40::ROBFragment::check_noex ( const uint16_t version = eformat::MAJOR_V40_VERSION,
const uint16_t rod_version = eformat::MAJOR_V31_VERSION ) const

Says if the fragment is valid.

This method does not throw exceptions.

Definition at line 167 of file v40_ROBFragment.cxx.

169{
170 return this->check_impl(version, rod_version, false);
171}

◆ check_rob()

bool offline_eformat::v40::ROBFragment::check_rob ( const uint16_t version = eformat::MAJOR_V40_VERSION) const

Says if the ROB fragment is valid.

This method will throw exceptions.

Definition at line 107 of file v40_ROBFragment.cxx.

108{
109 return this->check_rob_impl(version, true);
110}

◆ check_rob_impl()

bool offline_eformat::v40::ROBFragment::check_rob_impl ( const uint16_t version = eformat::MAJOR_V40_VERSION,
const bool exc = true ) const

Says if the ROB fragment is valid.

Exception behaviour is controllable.

Definition at line 71 of file v40_ROBFragment.cxx.

74{
75 bool result = true;
76
77 try{
78 if (Header::marker() != eformat::ROB) {
79 throw EFORMAT_WRONG_MARKER(marker(), eformat::ROB);
80 }
81 if (Header::version() >> 16 != version) {
82 throw EFORMAT_BAD_VERSION(Header::version() >> 16, version);
83 }
84 uint32_t calculated = 7 + Header::nstatus();
85 if (Header::header_size_word() != calculated) {
86 throw EFORMAT_SIZE_CHECK(calculated, Header::header_size_word());
87 }
88 }catch(eformat::WrongMarkerIssue &ex){
89 if(exc) throw ex;
90 result = false;
91 }catch(eformat::SizeCheckIssue &ex){
92 if(exc) throw ex;
93 result = false;
94 }catch(eformat::BadVersionIssue &ex){
95 if(exc) throw ex;
96 result = false;
97 }
98
99 return result;
100}
uint32_t marker() const
Returns the fragment type.
uint32_t nstatus() const
Returns the number of status words available.
uint32_t header_size_word() const
Returns the size, in words, of the current header.
setEventNumber uint32_t

◆ check_rob_noex()

bool offline_eformat::v40::ROBFragment::check_rob_noex ( const uint16_t version = eformat::MAJOR_V40_VERSION) const

Says if the ROB fragment is valid.

Does not throw exceptions.

Definition at line 102 of file v40_ROBFragment.cxx.

103{
104 return this->check_rob_impl(version, false);
105}

◆ check_rod()

bool offline_eformat::v40::ROBFragment::check_rod ( const uint16_t rod_version = eformat::MAJOR_V31_VERSION) const

Says if the underlying ROD fragment is valid.

Throws exceptions.

Definition at line 150 of file v40_ROBFragment.cxx.

151{
152 return this->check_rod_impl(version, true);
153}

◆ check_rod_impl()

bool offline_eformat::v40::ROBFragment::check_rod_impl ( const uint16_t rod_version = eformat::MAJOR_V31_VERSION,
const bool exc = true ) const

Says if the underlying ROD fragmentis valid.

Exception behaviour is controllable.

Definition at line 114 of file v40_ROBFragment.cxx.

117{
118 bool result = true;
119
120 try{
121 if ( rod_version() >> 16 != version ) {
122 throw EFORMAT_BAD_ROD_VERSION(rod_version() >> 16, version);
123 }
124 if ( rod_header_size_word() != 9 ) {
125 throw EFORMAT_SIZE_CHECK(9, rod_header_size_word());
126 }
127 if ( rod_fragment_size_word() != 12 + rod_nstatus() + rod_ndata() ) {
128 throw EFORMAT_ROD_SIZE_CHECK(rod_fragment_size_word(),
129 (12 + rod_nstatus() + rod_ndata()));
130 }
131 }catch(eformat::RODSizeCheckIssue &ex){
132 if(exc) throw ex;
133 result = false;
134 }catch(eformat::SizeCheckIssue &ex){
135 if(exc) throw ex;
136 result = false;
137 }catch(eformat::BadRodVersionIssue &ex){
138 if(exc) throw ex;
139 result = false;
140 }
141
142 return result;
143}
uint32_t rod_fragment_size_word() const
Returns the total fragment size.
uint32_t rod_ndata() const
Returns the number of data words available.
uint32_t rod_header_size_word() const
Returns the size, in words, of the current header.
uint32_t rod_nstatus() const
Returns the number of status words available.

◆ check_rod_noex()

bool offline_eformat::v40::ROBFragment::check_rod_noex ( const uint16_t rod_version = eformat::MAJOR_V31_VERSION) const

Says if the underlying ROD fragment is valid.

Does not throw exceptions.

Definition at line 145 of file v40_ROBFragment.cxx.

146{
147 return this->check_rod_impl(version, false);
148}

◆ checksum()

bool offline_eformat::v40::Header::checksum ( void ) const
inherited

This will actually re-calculate the checksum and verify that the payload of the current fragment matches that.

Only works with contiguous memory templates.

Definition at line 128 of file v40_Header.cxx.

129{
130 return (eval_checksum() == checksum_value());
131}
uint32_t eval_checksum(void) const
Evaluates the current (supposed) checksum for this fragment, taking into consideration the current se...
uint32_t checksum_value(void) const
Access the check sum value of this fragment, if any.

◆ checksum_type()

uint32_t offline_eformat::v40::Header::checksum_type ( ) const
inherited

Returns the check-sum type entry.

Definition at line 97 of file v40_Header.cxx.

98{
99 return m_top[6 + nstatus()];
100}
const uint32_t * m_top
< representation
Definition v40_Header.h:203

◆ checksum_value()

uint32_t offline_eformat::v40::Header::checksum_value ( void ) const
inherited

Access the check sum value of this fragment, if any.

Understand that if, checksum_type() resolves to eformat::NO_CHECKSUM, the returned value will have no meaning.

Definition at line 112 of file v40_Header.cxx.

113{
114 return (checksum_type()?m_top[fragment_size_word()-1]:0);
115}
uint32_t checksum_type() const
Returns the check-sum type entry.
uint32_t fragment_size_word() const
Returns the size, in words, of the current fragment.

◆ child() [1/2]

virtual void offline_eformat::v40::ROBFragment::child ( const uint32_t *& p,
size_t n ) const
inlinevirtual

Definition at line 296 of file v40_ROBFragment.h.

297 { p = child(n); }
const uint32_t * child(size_t n) const
Returns the nth child fragment.

◆ child() [2/2]

const uint32_t * offline_eformat::v40::ROBFragment::child ( size_t n) const

Returns the nth child fragment.

If the nth fragment doesn't exist, the behaviour is undefined.

Parameters
pA preallocated pointer you should provide.
nThe fragment position, starting at zero, of the child fragment you would like to get.

Definition at line 225 of file v40_ROBFragment.cxx.

226{
227 if (n == 0) return m_start;
228 return 0;
229}

◆ children()

uint32_t offline_eformat::v40::ROBFragment::children ( const uint32_t ** p,
size_t max ) const
virtual

Returns all the children of this fragment.

The input to this method is a valid set of iterators to existing, pre-allocated pointers

Parameters
pA pointer to a set of preallocated TPointer's to set to the position of the children of this fragment.
maxThe maximum number of children, p can point to.
Returns
The number of children found on this fragment

Definition at line 231 of file v40_ROBFragment.cxx.

233{
234 if (max == 0) return 0;
235 p[0] = m_start;
236 return 1;
237}
#define max(a, b)
Definition cfImp.cxx:41

◆ end() [1/2]

const uint32_t * offline_eformat::v40::Header::end ( ) const
inherited

Sets the pointer to one-past my end position.

Parameters
itThe pointer to set

Definition at line 82 of file v40_Header.cxx.

83{
84 return m_top + fragment_size_word();
85}

◆ end() [2/2]

void offline_eformat::v40::Header::end ( const uint32_t *& it) const
inlineinherited

Definition at line 144 of file v40_Header.h.

144{ it = end(); } //legacy
const uint32_t * end() const
Sets the pointer to one-past my end position.

◆ eval_checksum()

uint32_t offline_eformat::v40::Header::eval_checksum ( void ) const
inherited

Evaluates the current (supposed) checksum for this fragment, taking into consideration the current setting for the checksum type.

Please note this value may be different from the actual checksum_value() if for any reason the fragment is corrupted.

Definition at line 123 of file v40_Header.cxx.

124{
125 return eformat::helper::checksum(checksum_type(), payload(), payload_size_word());
126}
uint32_t payload_size_word(void) const
Returns the payload size.
const uint32_t * payload() const
Sets the pointer to where the payload starts.

◆ fragment_size_word()

uint32_t offline_eformat::v40::Header::fragment_size_word ( ) const
inherited

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

Definition at line 47 of file v40_Header.cxx.

48{
49 return m_top[1];
50}

◆ header_size_word()

uint32_t offline_eformat::v40::Header::header_size_word ( ) const
inherited

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

That does include the specific part of the header.

Definition at line 52 of file v40_Header.cxx.

53{
54 return m_top[2];
55}

◆ marker()

uint32_t offline_eformat::v40::Header::marker ( ) const
inherited

Returns the fragment type.

Definition at line 42 of file v40_Header.cxx.

43{
44 return m_top[0];
45}

◆ nchildren()

uint32_t offline_eformat::v40::ROBFragment::nchildren ( ) const
virtual

Returns the number of children available.

Definition at line 319 of file v40_ROBFragment.cxx.

320{
321 return 1;
322}

◆ nspecific()

uint32_t offline_eformat::v40::Header::nspecific ( ) const
inherited

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

Definition at line 102 of file v40_Header.cxx.

103{
104 return header_size_word() - ( 7 + nstatus() );
105}

◆ nstatus()

uint32_t offline_eformat::v40::Header::nstatus ( ) const
inherited

Returns the number of status words available.

Definition at line 67 of file v40_Header.cxx.

68{
69 return m_top[5];
70}

◆ operator=()

offline_eformat::v40::ROBFragment & offline_eformat::v40::ROBFragment::operator= ( const ROBFragment & other)

Assignment.

Parameters
otherThe fragment to be copied

Definition at line 52 of file v40_ROBFragment.cxx.

54{
55 if (this != &other) {
56 Header::operator=(other);
57 m_start=other.m_start;
58 }
59 return *this;
60}
Header & operator=(const Header &other)
Assigment operator.

◆ payload() [1/2]

const uint32_t * offline_eformat::v40::Header::payload ( ) const
inherited

Sets the pointer to where the payload starts.

Parameters
itThe pointer to set

Definition at line 77 of file v40_Header.cxx.

78{
79 return m_top + header_size_word();
80}

◆ payload() [2/2]

void offline_eformat::v40::Header::payload ( const uint32_t *& it) const
inlineinherited

Definition at line 136 of file v40_Header.h.

136{ it = payload(); } //legacy

◆ payload_size_word()

uint32_t offline_eformat::v40::Header::payload_size_word ( void ) const
inherited

Returns the payload size.

Definition at line 87 of file v40_Header.cxx.

88{
89 return fragment_size_word() - (header_size_word() + (checksum_type()?1:0));
90}

◆ problems()

void offline_eformat::v40::ROBFragment::problems ( std::vector< eformat::FragmentProblem > & p,
const uint16_t version = eformat::MAJOR_V40_VERSION,
const uint16_t rod_version = eformat::MAJOR_V31_VERSION ) const

Tells which problemS the current fragment has.

Definition at line 205 of file v40_ROBFragment.cxx.

208{
211}
void rod_problems(std::vector< eformat::FragmentProblem > &p, const uint16_t version=eformat::MAJOR_V31_VERSION) const
Tells which problemS the underlying ROD fragment has.
void rob_problems(std::vector< eformat::FragmentProblem > &p, const uint16_t version=eformat::MAJOR_V40_VERSION) const
Tells which problemS the current ROB fragment has.

◆ rob_problems()

void offline_eformat::v40::ROBFragment::rob_problems ( std::vector< eformat::FragmentProblem > & p,
const uint16_t version = eformat::MAJOR_V40_VERSION ) const

Tells which problemS the current ROB fragment has.

Definition at line 180 of file v40_ROBFragment.cxx.

182{
183 //ROB checking
184 if (Header::marker() != eformat::ROB)
185 p.push_back(eformat::WRONG_MARKER);
186 if ( Header::version() >> 16 != version )
187 p.push_back(eformat::UNSUPPORTED_VERSION);
188 uint32_t calculated = 7 + Header::nstatus();
189 if (Header::header_size_word() != calculated)
190 p.push_back(eformat::WRONG_FRAGMENT_SIZE);
191}

◆ rob_source_id()

uint32_t offline_eformat::v40::ROBFragment::rob_source_id ( ) const

Gets the source_id of the ROB fragment itself.

Definition at line 254 of file v40_ROBFragment.cxx.

255{
256 return Header::source_id();
257}
uint32_t source_id() const
Returns the full source identifier.

◆ rod_bc_id()

uint32_t offline_eformat::v40::ROBFragment::rod_bc_id ( ) const

Returns the bunch crossing identifier.

Definition at line 304 of file v40_ROBFragment.cxx.

305{
306 return m_start[6];
307}

◆ rod_data() [1/2]

const uint32_t * offline_eformat::v40::ROBFragment::rod_data ( ) const

Returns a pointer to the first data word.

Parameters
itAn updateable iterator you should provide.

Definition at line 219 of file v40_ROBFragment.cxx.

220{
221 if (!rod_status_position()) return m_start + 9 + rod_nstatus();
222 return m_start + 9;
223}
uint32_t rod_status_position() const
Returns the status block position.

◆ rod_data() [2/2]

void offline_eformat::v40::ROBFragment::rod_data ( const uint32_t *& it) const
inline

Definition at line 272 of file v40_ROBFragment.h.

273 { it = rod_data(); }
const uint32_t * rod_data() const
Returns a pointer to the first data word.

◆ rod_detev_type()

uint32_t offline_eformat::v40::ROBFragment::rod_detev_type ( ) const

Returns the detector event type.

Definition at line 314 of file v40_ROBFragment.cxx.

315{
316 return m_start[8];
317}

◆ rod_fragment_size_word()

uint32_t offline_eformat::v40::ROBFragment::rod_fragment_size_word ( ) const

Returns the total fragment size.

Definition at line 269 of file v40_ROBFragment.cxx.

270{
272}

◆ rod_header_size_word()

uint32_t offline_eformat::v40::ROBFragment::rod_header_size_word ( ) const

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

That does not include the trailer.

Definition at line 274 of file v40_ROBFragment.cxx.

275{
276 return m_start[1];
277}

◆ rod_lvl1_id()

uint32_t offline_eformat::v40::ROBFragment::rod_lvl1_id ( ) const

Returns the lvl1 identifier.

Definition at line 299 of file v40_ROBFragment.cxx.

300{
301 return m_start[5];
302}

◆ rod_lvl1_trigger_type()

uint32_t offline_eformat::v40::ROBFragment::rod_lvl1_trigger_type ( ) const

Returns the lvl1 trigger type.

Definition at line 309 of file v40_ROBFragment.cxx.

310{
311 return m_start[7];
312}

◆ rod_marker()

uint32_t offline_eformat::v40::ROBFragment::rod_marker ( ) const

Returns the fragment type.

Definition at line 264 of file v40_ROBFragment.cxx.

265{
266 return m_start[0];
267}

◆ rod_ndata()

uint32_t offline_eformat::v40::ROBFragment::rod_ndata ( ) const

Returns the number of data words available.

Definition at line 244 of file v40_ROBFragment.cxx.

245{
247}

◆ rod_nstatus()

uint32_t offline_eformat::v40::ROBFragment::rod_nstatus ( ) const

Returns the number of status words available.

Definition at line 239 of file v40_ROBFragment.cxx.

240{
242}

◆ rod_problems()

void offline_eformat::v40::ROBFragment::rod_problems ( std::vector< eformat::FragmentProblem > & p,
const uint16_t version = eformat::MAJOR_V31_VERSION ) const

Tells which problemS the underlying ROD fragment has.

Definition at line 193 of file v40_ROBFragment.cxx.

195{
196 //ROD stuff
197 if (rod_marker() != eformat::ROD) p.push_back(eformat::WRONG_ROD_MARKER);
198 if (rod_version() >> 16 != version)
199 p.push_back(eformat::UNSUPPORTED_ROD_VERSION);
200 if (rod_header_size_word() != 9) p.push_back(eformat::WRONG_ROD_HEADER_SIZE);
201 if (rod_fragment_size_word() != 12 + rod_nstatus() + rod_ndata())
202 p.push_back(eformat::WRONG_ROD_FRAGMENT_SIZE);
203}
uint32_t rod_marker() const
Returns the fragment type.

◆ rod_run_no()

uint32_t offline_eformat::v40::ROBFragment::rod_run_no ( ) const

Returns the current run number.

Definition at line 294 of file v40_ROBFragment.cxx.

295{
296 return m_start[4];
297}

◆ rod_source_id()

uint32_t offline_eformat::v40::ROBFragment::rod_source_id ( ) const

Returns the source identifier of the ROD fragment.

Definition at line 289 of file v40_ROBFragment.cxx.

290{
291 return m_start[3];
292}

◆ rod_start() [1/2]

const uint32_t * offline_eformat::v40::ROBFragment::rod_start ( ) const

Sets the given pointer to the ROD fragment start.

Parameters
itThe pointer to be set to the ROD fragment start

Definition at line 259 of file v40_ROBFragment.cxx.

260{
261 return m_start;
262}

◆ rod_start() [2/2]

void offline_eformat::v40::ROBFragment::rod_start ( const uint32_t *& it) const
inline

Definition at line 187 of file v40_ROBFragment.h.

188 { it = rod_start(); }
const uint32_t * rod_start() const
Sets the given pointer to the ROD fragment start.

◆ rod_status() [1/2]

const uint32_t * offline_eformat::v40::ROBFragment::rod_status ( ) const

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

Parameters
itAn updateable iterator you should provide.

Definition at line 213 of file v40_ROBFragment.cxx.

214{
215 if (rod_status_position()) return m_start + 9 + rod_ndata();
216 return m_start + 9;
217}

◆ rod_status() [2/2]

void offline_eformat::v40::ROBFragment::rod_status ( const uint32_t *& it) const
inline

Definition at line 258 of file v40_ROBFragment.h.

259 { it = rod_status(); }
const uint32_t * rod_status() const
Returns the status words, as an iterator to the status words available.

◆ rod_status_position()

uint32_t offline_eformat::v40::ROBFragment::rod_status_position ( ) const

Returns the status block position.

A value of zero indicates that the status block preceeds the data block. A value of one means the contrary.

Definition at line 249 of file v40_ROBFragment.cxx.

250{
252}

◆ rod_trailer_size_word()

uint32_t offline_eformat::v40::ROBFragment::rod_trailer_size_word ( ) const

Returns the size, in words, of the trailer.

Definition at line 279 of file v40_ROBFragment.cxx.

280{
281 return 3;
282}

◆ rod_version()

uint32_t offline_eformat::v40::ROBFragment::rod_version ( ) const

Returns the formatting version for the ROD fragment.

Definition at line 284 of file v40_ROBFragment.cxx.

285{
286 return m_start[2];
287}

◆ source_id()

uint32_t offline_eformat::v40::Header::source_id ( ) const
inherited

Returns the full source identifier.

Definition at line 62 of file v40_Header.cxx.

63{
64 return m_top[4];
65}

◆ specific_header() [1/2]

const uint32_t * offline_eformat::v40::Header::specific_header ( ) const
inherited

Returns an iterator to the start of the specific header part.

Parameters
itAn updateable iterator you should provide.

Definition at line 107 of file v40_Header.cxx.

108{
109 return m_top + 7 + nstatus();
110}

◆ specific_header() [2/2]

void offline_eformat::v40::Header::specific_header ( const uint32_t *& it) const
inlineinherited

Definition at line 176 of file v40_Header.h.

177 { it = specific_header(); }

◆ start() [1/2]

const uint32_t * offline_eformat::v40::Header::start ( ) const
inherited

Sets the pointer to my start.

Parameters
itThe pointer to set

Definition at line 72 of file v40_Header.cxx.

73{
74 return m_top;
75}

◆ start() [2/2]

void offline_eformat::v40::Header::start ( const uint32_t *& it) const
inlineinherited

Definition at line 128 of file v40_Header.h.

128{ it = start(); } //legacy
const uint32_t * start() const
Sets the pointer to my start.

◆ status() [1/2]

const uint32_t * offline_eformat::v40::Header::status ( ) const
inherited

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

Parameters
itAn updateable iterator you should provide.

Definition at line 92 of file v40_Header.cxx.

93{
94 return m_top + 6;
95}

◆ status() [2/2]

void offline_eformat::v40::Header::status ( const uint32_t *& it) const
inlineinherited

Definition at line 157 of file v40_Header.h.

157{ it = status(); } //legacy
const uint32_t * status() const
Returns the status words, as an iterator to the status words available.

◆ throws() [1/2]

bool offline_eformat::v40::Header::throws ( ) const
inherited

Says if we are supposed to throw exceptions or not.

◆ throws() [2/2]

void offline_eformat::v40::Header::throws ( bool b)
inherited

If you set this parameter, objects of this type will throw exceptions.

The default behavior is to throw.

◆ version()

uint32_t offline_eformat::v40::Header::version ( ) const
inherited

Returns the formatting version.

Definition at line 57 of file v40_Header.cxx.

58{
59 return m_top[3];
60}

Member Data Documentation

◆ m_start

const uint32_t* offline_eformat::v40::ROBFragment::m_start
private

my one-after-the-last word

Definition at line 313 of file v40_ROBFragment.h.

◆ m_top

const uint32_t* offline_eformat::v40::Header::m_top
privateinherited

< representation

my start word

Definition at line 203 of file v40_Header.h.


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