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

Private Attributes

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

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 }

◆ 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.

35  : Header(blob.ptr()),
36  m_start()
37 {
39 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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); }

◆ 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 }

◆ 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

◆ 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 }

◆ 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) {
57  m_start=other.m_start;
58  }
59  return *this;
60 }

◆ 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 }

◆ 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 }

◆ 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 }

◆ 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(); }

◆ 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 {
271  return Header::payload_size_word();
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 }

◆ 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(); }

◆ 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(); }

◆ 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

◆ 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

◆ 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:
offline_eformat::v40::Header::end
const uint32_t * end() const
Sets the pointer to one-past my end position.
Definition: v40_Header.cxx:82
offline_eformat::v40::ROBFragment::child
const uint32_t * child(size_t n) const
Returns the nth child fragment.
Definition: v40_ROBFragment.cxx:225
offline_eformat::v40::Header::version
uint32_t version() const
Returns the formatting version.
Definition: v40_Header.cxx:57
get_generator_info.result
result
Definition: get_generator_info.py:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
offline_eformat::v40::ROBFragment::check_rob_impl
bool check_rob_impl(const uint16_t version=eformat::MAJOR_V40_VERSION, const bool exc=true) const
Says if the ROB fragment is valid.
Definition: v40_ROBFragment.cxx:71
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
offline_eformat::v40::Header::payload_size_word
uint32_t payload_size_word(void) const
Returns the payload size.
Definition: v40_Header.cxx:87
offline_eformat::v40::Header::source_id
uint32_t source_id() const
Returns the full source identifier.
Definition: v40_Header.cxx:62
skel.it
it
Definition: skel.GENtoEVGEN.py:423
offline_eformat::v40::Header::header_size_word
uint32_t header_size_word() const
Returns the size, in words, of the current header.
Definition: v40_Header.cxx:52
offline_eformat::v40::ROBFragment::rod_start
const uint32_t * rod_start() const
Sets the given pointer to the ROD fragment start.
Definition: v40_ROBFragment.cxx:259
offline_eformat::v40::ROBFragment::rod_problems
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.
Definition: v40_ROBFragment.cxx:194
offline_eformat::v40::Header::specific_header
const uint32_t * specific_header() const
Returns an iterator to the start of the specific header part.
Definition: v40_Header.cxx:107
offline_eformat::v40::Header::status
const uint32_t * status() const
Returns the status words, as an iterator to the status words available.
Definition: v40_Header.cxx:92
offline_eformat::v40::ROBFragment::rod_status_position
uint32_t rod_status_position() const
Returns the status block position.
Definition: v40_ROBFragment.cxx:249
offline_eformat::v40::ROBFragment::rod_marker
uint32_t rod_marker() const
Returns the fragment type.
Definition: v40_ROBFragment.cxx:264
offline_eformat::v40::ROBFragment::rod_data
const uint32_t * rod_data() const
Returns a pointer to the first data word.
Definition: v40_ROBFragment.cxx:219
offline_eformat::v40::ROBFragment::rod_version
uint32_t rod_version() const
Returns the formatting version for the ROD fragment.
Definition: v40_ROBFragment.cxx:284
offline_eformat::v40::Header::m_top
const uint32_t * m_top
< representation
Definition: v40_Header.h:203
offline_eformat::v40::ROBFragment::rod_nstatus
uint32_t rod_nstatus() const
Returns the number of status words available.
Definition: v40_ROBFragment.cxx:239
offline_eformat::v40::Header::payload
const uint32_t * payload() const
Sets the pointer to where the payload starts.
Definition: v40_Header.cxx:77
beamspotman.n
n
Definition: beamspotman.py:731
offline_eformat::v40::Header::checksum_type
uint32_t checksum_type() const
Returns the check-sum type entry.
Definition: v40_Header.cxx:97
offline_eformat::v40::Header::operator=
Header & operator=(const Header &other)
Assigment operator.
Definition: v40_Header.cxx:34
offline_eformat::v40::ROBFragment::m_start
const uint32_t * m_start
my one-after-the-last word
Definition: v40_ROBFragment.h:313
offline_eformat::v40::ROBFragment::check_rod_impl
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.
Definition: v40_ROBFragment.cxx:114
offline_eformat::v40::Header::marker
uint32_t marker() const
Returns the fragment type.
Definition: v40_Header.cxx:42
offline_eformat::v40::Header::checksum_value
uint32_t checksum_value(void) const
Access the check sum value of this fragment, if any.
Definition: v40_Header.cxx:112
offline_eformat::v40::ROBFragment::rod_header_size_word
uint32_t rod_header_size_word() const
Returns the size, in words, of the current header.
Definition: v40_ROBFragment.cxx:274
offline_eformat::v40::Header::assign
Header & assign(const uint32_t *it)
Reassign this header.
Definition: v40_Header.cxx:117
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
offline_eformat::v40::Header::eval_checksum
uint32_t eval_checksum(void) const
Evaluates the current (supposed) checksum for this fragment, taking into consideration the current se...
Definition: v40_Header.cxx:123
offline_eformat::v40::ROBFragment::rod_status
const uint32_t * rod_status() const
Returns the status words, as an iterator to the status words available.
Definition: v40_ROBFragment.cxx:213
offline_eformat::v40::ROBFragment::check_impl
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.
Definition: v40_ROBFragment.cxx:157
offline_eformat::v40::ROBFragment::rod_fragment_size_word
uint32_t rod_fragment_size_word() const
Returns the total fragment size.
Definition: v40_ROBFragment.cxx:269
offline_eformat::v40::Header::start
const uint32_t * start() const
Sets the pointer to my start.
Definition: v40_Header.cxx:72
offline_eformat::v40::ROBFragment::rob_problems
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.
Definition: v40_ROBFragment.cxx:181
offline_eformat::v40::Header::fragment_size_word
uint32_t fragment_size_word() const
Returns the size, in words, of the current fragment.
Definition: v40_Header.cxx:47
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
offline_eformat::v40::Header::Header
Header()
Builds an empty, otherwise useless Header.
Definition: v40_Header.cxx:20
offline_eformat::v40::ROBFragment::rod_ndata
uint32_t rod_ndata() const
Returns the number of data words available.
Definition: v40_ROBFragment.cxx:244
offline_eformat::v40::Header::nstatus
uint32_t nstatus() const
Returns the number of status words available.
Definition: v40_Header.cxx:67