ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
offline_eformat::v40::FullEventFragment Class Reference

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

#include <v40_FullEventFragment.h>

Inheritance diagram for offline_eformat::v40::FullEventFragment:
Collaboration diagram for offline_eformat::v40::FullEventFragment:

Public Member Functions

 FullEventFragment (const uint32_t *it)
 To build a fragment given the containing buffer. More...
 
 FullEventFragment ()
 Builds an empty, otherwise useless FullEventFragment. More...
 
 FullEventFragment (const FullEventFragment &other)
 Copy constructor. More...
 
 FullEventFragment (const eformat::helper::u32list &blob)
 Constructor that only works with T=<real pointer>. More...
 
 FullEventFragment (const eformat::helper::u32slice &blob)
 Constructor that only works with T=<real pointer>. More...
 
virtual ~FullEventFragment ()
 Destructor virtualisation. More...
 
FullEventFragmentoperator= (const FullEventFragment &other)
 Copy operator. More...
 
FullEventFragmentassign (const uint32_t *it)
 Manual re-assignment. More...
 
bool check_impl (const uint16_t version=eformat::MAJOR_V40_VERSION, bool exc=true) const
 Says if the the fragment is valid. More...
 
bool check (const uint16_t version=eformat::MAJOR_V40_VERSION) const
 Says if the the fragment is valid. More...
 
bool check_noex (const uint16_t version=eformat::MAJOR_V40_VERSION) const
 Says if the the fragment is valid. More...
 
bool check_tree_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 and all children are valid. More...
 
bool check_tree (const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Says if the Fragment and all children are valid. More...
 
bool check_tree_noex (const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Says if the Fragment, all children and all RODs are valid, without throwing exceptions. More...
 
void problems (std::vector< eformat::FragmentProblem > &p, const uint16_t version=eformat::MAJOR_V40_VERSION) const
 Tells which problems the current fragment has. More...
 
void problems_tree (std::vector< eformat::helper::ProblemContainer > &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 and all the children have. More...
 
void robs (std::vector< ROBFragment > &robs) const
 Retrieves a vector of all ROBs from this fragment. More...
 
void robs (std::vector< ROBFragment > &good, std::vector< ROBFragment > &bad, const uint16_t version=eformat::MAJOR_V40_VERSION, const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
 Retrieves vectors of good and bad ROBs from this fragment, separated. More...
 
uint32_t bc_time_seconds () const
 Returns amount of seconds since the (unix) origin, for the bunch crossing time. More...
 
uint32_t bc_time_nanoseconds () const
 Returns amount of nanoseconds aditionally to the amount of seconds returned by bc_time_seconds, for the bunch crossing time. More...
 
uint32_t global_id () const
 Returns the global identifier. More...
 
uint32_t run_type () const
 Returns the run type. More...
 
uint32_t run_no () const
 Returns the run number. More...
 
uint16_t lumi_block () const
 Returns the luminosity block number. More...
 
uint32_t lvl1_id () const
 Returns the lvl1 identifier. More...
 
uint16_t bc_id () const
 Returns the bunch crossing identifier. More...
 
uint8_t lvl1_trigger_type () const
 Returns the lvl1 trigger type. More...
 
uint32_t nlvl1_trigger_info () const
 Returns the number of lvl1 trigger info words. More...
 
const uint32_t * lvl1_trigger_info () const
 Returns an iterator to the first of the LVL1 trigger info words. More...
 
void lvl1_trigger_info (const uint32_t *&it) const
 
uint32_t nlvl2_trigger_info () const
 Returns the number of lvl2 trigger info words. More...
 
const uint32_t * lvl2_trigger_info () const
 Returns an iterator to the first of the LVL2 trigger info words. More...
 
void lvl2_trigger_info (const uint32_t *&it) const
 
uint32_t nevent_filter_info () const
 Returns the number of Event Filter words. More...
 
const uint32_t * event_filter_info () const
 Returns an iterator to the first of the EF info words. More...
 
void event_filter_info (const uint32_t *&it) const
 
uint32_t nstream_tag () const
 Returns the number of stream tag words. More...
 
const uint32_t * stream_tag () const
 Returns an iterator to the first of the stream tag words. More...
 
void stream_tag (const uint32_t *&it) const
 
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
 
const uint32_t * child_check (size_t n) const
 Returns the nth child fragment. More...
 
virtual void child_check (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 start word More...
 
const uint32_t * m_top
 < representation More...
 

Detailed Description

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

Definition at line 35 of file v40_FullEventFragment.h.

Constructor & Destructor Documentation

◆ FullEventFragment() [1/5]

offline_eformat::v40::FullEventFragment::FullEventFragment ( 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 17 of file v40_FullEventFragment.cxx.

18  : Header(it),
19  m_start()
20 {
22 }

◆ FullEventFragment() [2/5]

offline_eformat::v40::FullEventFragment::FullEventFragment ( )

Builds an empty, otherwise useless FullEventFragment.

Definition at line 24 of file v40_FullEventFragment.cxx.

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

◆ FullEventFragment() [3/5]

offline_eformat::v40::FullEventFragment::FullEventFragment ( const FullEventFragment other)

Copy constructor.

Parameters
otherThe fragment to be copied

Definition at line 29 of file v40_FullEventFragment.cxx.

31  : Header(other), m_start(other.m_start)
32 {
33 }

◆ FullEventFragment() [4/5]

offline_eformat::v40::FullEventFragment::FullEventFragment ( 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 35 of file v40_FullEventFragment.cxx.

37  : Header(blob.ptr()),
38  m_start()
39 {
41 }

◆ FullEventFragment() [5/5]

offline_eformat::v40::FullEventFragment::FullEventFragment ( 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 43 of file v40_FullEventFragment.cxx.

45  : Header(blob.ptr()),
46  m_start()
47 {
49 }

◆ ~FullEventFragment()

offline_eformat::v40::FullEventFragment::~FullEventFragment ( )
virtual

Destructor virtualisation.

Definition at line 51 of file v40_FullEventFragment.cxx.

52 {
53 }

Member Function Documentation

◆ assign()

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

Manual re-assignment.

Parameters
itThe position pointing the first word of this fragment

Definition at line 65 of file v40_FullEventFragment.cxx.

67 {
70  return *this;
71 }

◆ bc_id()

uint16_t offline_eformat::v40::FullEventFragment::bc_id ( ) const

Returns the bunch crossing identifier.

Definition at line 330 of file v40_FullEventFragment.cxx.

331 {
332  return m_start[7];
333 }

◆ bc_time_nanoseconds()

uint32_t offline_eformat::v40::FullEventFragment::bc_time_nanoseconds ( ) const

Returns amount of nanoseconds aditionally to the amount of seconds returned by bc_time_seconds, for the bunch crossing time.

Definition at line 300 of file v40_FullEventFragment.cxx.

301 {
302  return m_start[1];
303 }

◆ bc_time_seconds()

uint32_t offline_eformat::v40::FullEventFragment::bc_time_seconds ( ) const

Returns amount of seconds since the (unix) origin, for the bunch crossing time.

Definition at line 295 of file v40_FullEventFragment.cxx.

296 {
297  return m_start[0];
298 }

◆ check()

bool offline_eformat::v40::FullEventFragment::check ( const uint16_t  version = eformat::MAJOR_V40_VERSION) const

Says if the the fragment is valid.

This method throw exceptions.

Definition at line 135 of file v40_FullEventFragment.cxx.

136 {
137  return this->check_impl(version, true);
138 }

◆ check_impl()

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

Says if the the fragment is valid.

You can control the exception behaviour.

Definition at line 96 of file v40_FullEventFragment.cxx.

100 {
101 
102  bool result = true;
103 
104  //Fragment checking, only this header
105  try{
106  if (Header::marker() != eformat::FULL_EVENT) {
107  throw EFORMAT_WRONG_MARKER(marker(), eformat::FULL_EVENT);
108  }
109 
110  if (Header::version() >> 16 != version) {
111  throw EFORMAT_BAD_VERSION(Header::version() >> 16, version);
112  }
113 
114  uint32_t calculated = 20 + Header::nstatus() +
116  nstream_tag();
117  if (Header::header_size_word() != calculated) {
118  throw EFORMAT_SIZE_CHECK(calculated, Header::header_size_word());
119  }
120  }catch(eformat::WrongMarkerIssue &ex){
121  if(exc) throw ex;
122  result = false;
123  }catch(eformat::BadVersionIssue &ex){
124  if(exc) throw ex;
125  result = false;
126  }catch(eformat::SizeCheckIssue &ex){
127  if(exc) throw ex;
128  result = false;
129  }
130 
131  return result;
132 }

◆ check_noex()

bool offline_eformat::v40::FullEventFragment::check_noex ( const uint16_t  version = eformat::MAJOR_V40_VERSION) const

Says if the the fragment is valid.

This does NOT throw exceptions.

Definition at line 140 of file v40_FullEventFragment.cxx.

141 {
142  return this->check_impl(version, false);
143 }

◆ check_tree()

bool offline_eformat::v40::FullEventFragment::check_tree ( const uint16_t  version = eformat::MAJOR_V40_VERSION,
const uint16_t  rod_version = eformat::MAJOR_V31_VERSION 
) const

Says if the Fragment and all children are valid.

This throws exceptions.

Definition at line 186 of file v40_FullEventFragment.cxx.

189 {
190  return this->check_tree_impl(version, rod_version, true);
191 }

◆ check_tree_impl()

bool offline_eformat::v40::FullEventFragment::check_tree_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 and all children are valid.

You can control the exception behaviour.

Definition at line 146 of file v40_FullEventFragment.cxx.

149 {
150 
151  if (!check_impl(version, exc)) return false; // check myself
152  uint32_t total = nchildren();
153  for (size_t i=0; i<total; ++i) {
154  const uint32_t* fp;
155  child(fp, i);
156  ROBFragment f(fp);
157  bool rob_check;
158  try{
159  rob_check = f.check(version, rod_version);
160  }catch(eformat::RODSizeCheckIssue &ex){
161  //In case of a truncated ROD fragment, we ignore and continue
162  //Anyway the ROB is good, hence we can safely navigate the event
163  continue;
164  }catch(eformat::WrongMarkerIssue &ex){
165  if(exc) throw ex;
166  rob_check = false;
167  }catch(eformat::BadVersionIssue &ex){
168  if(exc) throw ex;
169  rob_check = false;
170  }catch(eformat::SizeCheckIssue &ex){
171  if(exc) throw ex;
172  rob_check = false;
173  }catch(eformat::BadRodVersionIssue &ex){
174  if(exc) throw ex;
175  rob_check = false;
176  }catch(eformat::Issue &ex){
177  if(exc) throw ex;
178  rob_check = false;
179  }
180 
181  if (!rob_check) return false;
182  }
183  return true;
184 }

◆ check_tree_noex()

bool offline_eformat::v40::FullEventFragment::check_tree_noex ( const uint16_t  version = eformat::MAJOR_V40_VERSION,
const uint16_t  rod_version = eformat::MAJOR_V31_VERSION 
) const

Says if the Fragment, all children and all RODs are valid, without throwing exceptions.

Definition at line 193 of file v40_FullEventFragment.cxx.

196 {
197  return this->check_tree_impl(version, rod_version, false);
198 }

◆ 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::FullEventFragment::child ( const uint32_t *&  p,
size_t  n 
) const
inlinevirtual

Definition at line 281 of file v40_FullEventFragment.h.

282  { p = child(n); }

◆ child() [2/2]

const uint32_t * offline_eformat::v40::FullEventFragment::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 274 of file v40_FullEventFragment.cxx.

275 {
276  const uint32_t* next = Header::payload();
277  for (size_t i=0; i<n; ++i) next += next[1];
278  return next;
279 }

◆ child_check() [1/2]

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

Definition at line 296 of file v40_FullEventFragment.h.

297  { p = child_check(n); } //legacy

◆ child_check() [2/2]

const uint32_t * offline_eformat::v40::FullEventFragment::child_check ( size_t  n) const

Returns the nth child fragment.

If the nth fragment doesn't exist, an exception is thrown.

Warning
Use this method with care, it is slower than the equivalent method that doesn't check.
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 281 of file v40_FullEventFragment.cxx.

282 {
283  uint32_t total = nchildren();
284  if (n >= total) throw EFORMAT_NO_SUCH_CHILD(n, total);
285  return child(n);
286 }

◆ children()

uint32_t offline_eformat::v40::FullEventFragment::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 const uint32_t*'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 288 of file v40_FullEventFragment.cxx.

289 {
290  const uint32_t* payload_start;
291  Header::payload(payload_start);
292  return find_fragments(child_marker(static_cast<eformat::HeaderMarker>(Header::marker())), payload_start, Header::payload_size_word(), p, max);
293 }

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

◆ event_filter_info() [1/2]

const uint32_t * offline_eformat::v40::FullEventFragment::event_filter_info ( ) const

Returns an iterator to the first of the EF info words.

Parameters
itAn updateable iterator you should provide.

Definition at line 83 of file v40_FullEventFragment.cxx.

84 {
85  return m_start + 12 + nlvl1_trigger_info() + nlvl2_trigger_info();
86 }

◆ event_filter_info() [2/2]

void offline_eformat::v40::FullEventFragment::event_filter_info ( const uint32_t *&  it) const
inline

Definition at line 250 of file v40_FullEventFragment.h.

251  { it = event_filter_info(); }

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

◆ global_id()

uint32_t offline_eformat::v40::FullEventFragment::global_id ( ) const

Returns the global identifier.

Definition at line 305 of file v40_FullEventFragment.cxx.

306 {
307  return m_start[2];
308 }

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

◆ lumi_block()

uint16_t offline_eformat::v40::FullEventFragment::lumi_block ( ) const

Returns the luminosity block number.

Definition at line 320 of file v40_FullEventFragment.cxx.

321 {
322  return m_start[5];
323 }

◆ lvl1_id()

uint32_t offline_eformat::v40::FullEventFragment::lvl1_id ( ) const

Returns the lvl1 identifier.

Definition at line 325 of file v40_FullEventFragment.cxx.

326 {
327  return m_start[6];
328 }

◆ lvl1_trigger_info() [1/2]

const uint32_t * offline_eformat::v40::FullEventFragment::lvl1_trigger_info ( ) const

Returns an iterator to the first of the LVL1 trigger info words.

Parameters
itAn updateable iterator you should provide.

Definition at line 73 of file v40_FullEventFragment.cxx.

74 {
75  return m_start + 10;
76 }

◆ lvl1_trigger_info() [2/2]

void offline_eformat::v40::FullEventFragment::lvl1_trigger_info ( const uint32_t *&  it) const
inline

Definition at line 222 of file v40_FullEventFragment.h.

223  { it = lvl1_trigger_info(); }

◆ lvl1_trigger_type()

uint8_t offline_eformat::v40::FullEventFragment::lvl1_trigger_type ( ) const

Returns the lvl1 trigger type.

Definition at line 335 of file v40_FullEventFragment.cxx.

336 {
337  return m_start[8];
338 }

◆ lvl2_trigger_info() [1/2]

const uint32_t * offline_eformat::v40::FullEventFragment::lvl2_trigger_info ( ) const

Returns an iterator to the first of the LVL2 trigger info words.

Parameters
itAn updateable iterator you should provide.

Definition at line 78 of file v40_FullEventFragment.cxx.

79 {
80  return m_start + 11 + nlvl1_trigger_info();
81 }

◆ lvl2_trigger_info() [2/2]

void offline_eformat::v40::FullEventFragment::lvl2_trigger_info ( const uint32_t *&  it) const
inline

Definition at line 236 of file v40_FullEventFragment.h.

237  { it = lvl2_trigger_info(); }

◆ 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::FullEventFragment::nchildren ( ) const
virtual

Returns the number of children available.

Definition at line 269 of file v40_FullEventFragment.cxx.

270 {
271  return children(0,0);
272 }

◆ nevent_filter_info()

uint32_t offline_eformat::v40::FullEventFragment::nevent_filter_info ( ) const

Returns the number of Event Filter words.

Definition at line 350 of file v40_FullEventFragment.cxx.

351 {
353 }

◆ nlvl1_trigger_info()

uint32_t offline_eformat::v40::FullEventFragment::nlvl1_trigger_info ( ) const

Returns the number of lvl1 trigger info words.

Definition at line 340 of file v40_FullEventFragment.cxx.

341 {
342  return m_start[9];
343 }

◆ nlvl2_trigger_info()

uint32_t offline_eformat::v40::FullEventFragment::nlvl2_trigger_info ( ) const

Returns the number of lvl2 trigger info words.

Definition at line 345 of file v40_FullEventFragment.cxx.

346 {
347  return m_start[10+nlvl1_trigger_info()];
348 }

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

◆ nstream_tag()

uint32_t offline_eformat::v40::FullEventFragment::nstream_tag ( ) const

Returns the number of stream tag words.

Definition at line 355 of file v40_FullEventFragment.cxx.

356 {
357  return m_start[12+nlvl1_trigger_info() +
359 }

◆ operator=()

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

Copy operator.

Parameters
otherThe fragment to be copied

Definition at line 55 of file v40_FullEventFragment.cxx.

57 {
58  if (this != &other) {
60  m_start=other.m_start;
61  }
62  return *this;
63 }

◆ 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::FullEventFragment::problems ( std::vector< eformat::FragmentProblem > &  p,
const uint16_t  version = eformat::MAJOR_V40_VERSION 
) const

Tells which problems the current fragment has.

Definition at line 200 of file v40_FullEventFragment.cxx.

201  {
202  //Fragment checking, only this header
203  if (Header::marker() != eformat::FULL_EVENT)
204  p.push_back(eformat::WRONG_MARKER);
205  if ( Header::version() >> 16 != version )
206  p.push_back(eformat::UNSUPPORTED_VERSION);
207  uint32_t calculated = 20 + Header::nstatus() +
209  nstream_tag();
210  if (Header::header_size_word() != calculated)
211  p.push_back(eformat::WRONG_FRAGMENT_SIZE);
212 }

◆ problems_tree()

void offline_eformat::v40::FullEventFragment::problems_tree ( std::vector< eformat::helper::ProblemContainer > &  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 and all the children have.

Definition at line 215 of file v40_FullEventFragment.cxx.

220 {
221  std::vector<eformat::FragmentProblem> tmp;
222  this->problems(tmp, version);
223 
224  if (!tmp.empty()){
225  eformat::helper::ProblemContainer pc(this->source_id(), tmp);
226  p.push_back(pc);
227  return;
228  }
229 
230  uint32_t total = this->nchildren();
231  for (size_t i=0; i<total; ++i) {
232  const uint32_t* fp;
233  child(fp, i);
234  ROBFragment f(fp);
235  std::vector<eformat::FragmentProblem> tmp;
236  f.problems(tmp, version, rod_version);
237  eformat::helper::ProblemContainer pc(f.source_id(), tmp);
238  p.push_back(pc);
239  }
240 }

◆ robs() [1/2]

void offline_eformat::v40::FullEventFragment::robs ( std::vector< ROBFragment > &  good,
std::vector< ROBFragment > &  bad,
const uint16_t  version = eformat::MAJOR_V40_VERSION,
const uint16_t  rod_version = eformat::MAJOR_V31_VERSION 
) const

Retrieves vectors of good and bad ROBs from this fragment, separated.

Definition at line 254 of file v40_FullEventFragment.cxx.

258 {
259  uint32_t total = nchildren();
260  for (size_t i=0; i<total; ++i) {
261  const uint32_t* fp;
262  child(fp, i);
263  ROBFragment f(fp);
264  if (f.check_noex(version, rod_version)) good.push_back(f);
265  else bad.push_back(f);
266  }
267 }

◆ robs() [2/2]

void offline_eformat::v40::FullEventFragment::robs ( std::vector< ROBFragment > &  robs) const

Retrieves a vector of all ROBs from this fragment.

Definition at line 242 of file v40_FullEventFragment.cxx.

244 {
245  uint32_t total = nchildren();
246  r.reserve(total);
247  for (size_t i=0; i<total; ++i) {
248  const uint32_t* fp;
249  child(fp, i);
250  r.push_back(fp);
251  }
252 }

◆ run_no()

uint32_t offline_eformat::v40::FullEventFragment::run_no ( ) const

Returns the run number.

Definition at line 315 of file v40_FullEventFragment.cxx.

316 {
317  return m_start[4];
318 }

◆ run_type()

uint32_t offline_eformat::v40::FullEventFragment::run_type ( ) const

Returns the run type.

Definition at line 310 of file v40_FullEventFragment.cxx.

311 {
312  return m_start[3];
313 }

◆ 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

◆ stream_tag() [1/2]

const uint32_t * offline_eformat::v40::FullEventFragment::stream_tag ( ) const

Returns an iterator to the first of the stream tag words.

Parameters
itAn updateable iterator you should provide.

Definition at line 88 of file v40_FullEventFragment.cxx.

89 {
90  return m_start + 13 + nlvl1_trigger_info() + nlvl2_trigger_info() +
92 }

◆ stream_tag() [2/2]

void offline_eformat::v40::FullEventFragment::stream_tag ( const uint32_t *&  it) const
inline

Definition at line 264 of file v40_FullEventFragment.h.

265  { it = stream_tag(); }

◆ 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::FullEventFragment::m_start
private

my start word

Definition at line 313 of file v40_FullEventFragment.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:
bad
@ bad
Definition: SUSYToolsTester.cxx:100
offline_eformat::v40::Header::end
const uint32_t * end() const
Sets the pointer to one-past my end position.
Definition: v40_Header.cxx:82
beamspotman.r
def r
Definition: beamspotman.py:676
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
max
#define max(a, b)
Definition: cfImp.cxx:41
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
offline_eformat::v40::FullEventFragment::child
const uint32_t * child(size_t n) const
Returns the nth child fragment.
Definition: v40_FullEventFragment.cxx:274
Issue
Configuration Issue
Definition: PscIssues.h:31
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
offline_eformat::v40::FullEventFragment::lvl2_trigger_info
const uint32_t * lvl2_trigger_info() const
Returns an iterator to the first of the LVL2 trigger info words.
Definition: v40_FullEventFragment.cxx:78
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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::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::FullEventFragment::check_tree_impl
bool check_tree_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 and all children are valid.
Definition: v40_FullEventFragment.cxx:147
offline_eformat::v40::FullEventFragment::nstream_tag
uint32_t nstream_tag() const
Returns the number of stream tag words.
Definition: v40_FullEventFragment.cxx:355
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::Header::m_top
const uint32_t * m_top
< representation
Definition: v40_Header.h:203
offline_eformat::v40::FullEventFragment::m_start
const uint32_t * m_start
my start word
Definition: v40_FullEventFragment.h:313
offline_eformat::v40::FullEventFragment::nevent_filter_info
uint32_t nevent_filter_info() const
Returns the number of Event Filter words.
Definition: v40_FullEventFragment.cxx:350
offline_eformat::v40::Header::payload
const uint32_t * payload() const
Sets the pointer to where the payload starts.
Definition: v40_Header.cxx:77
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
offline_eformat::v40::FullEventFragment::problems
void problems(std::vector< eformat::FragmentProblem > &p, const uint16_t version=eformat::MAJOR_V40_VERSION) const
Tells which problems the current fragment has.
Definition: v40_FullEventFragment.cxx:201
trigmenu_modify_prescale_json.fp
fp
Definition: trigmenu_modify_prescale_json.py:53
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
hist_file_dump.f
f
Definition: hist_file_dump.py:135
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
offline_eformat::v40::FullEventFragment::nchildren
virtual uint32_t nchildren() const
Returns the number of children available.
Definition: v40_FullEventFragment.cxx:269
offline_eformat::v40::FullEventFragment::check_impl
bool check_impl(const uint16_t version=eformat::MAJOR_V40_VERSION, bool exc=true) const
Says if the the fragment is valid.
Definition: v40_FullEventFragment.cxx:97
offline_eformat::v40::FullEventFragment::nlvl1_trigger_info
uint32_t nlvl1_trigger_info() const
Returns the number of lvl1 trigger info words.
Definition: v40_FullEventFragment.cxx:340
offline_eformat::v40::Header::marker
uint32_t marker() const
Returns the fragment type.
Definition: v40_Header.cxx:42
offline_eformat::v40::FullEventFragment::nlvl2_trigger_info
uint32_t nlvl2_trigger_info() const
Returns the number of lvl2 trigger info words.
Definition: v40_FullEventFragment.cxx:345
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition: RawEvent.h:27
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::Header::assign
Header & assign(const uint32_t *it)
Reassign this header.
Definition: v40_Header.cxx:117
ReadBchFromCool.good
good
Definition: ReadBchFromCool.py:433
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::FullEventFragment::children
virtual uint32_t children(const uint32_t **p, size_t max) const
Returns all the children of this fragment.
Definition: v40_FullEventFragment.cxx:288
offline_eformat::v40::FullEventFragment::child_check
const uint32_t * child_check(size_t n) const
Returns the nth child fragment.
Definition: v40_FullEventFragment.cxx:281
offline_eformat::v40::Header::start
const uint32_t * start() const
Sets the pointer to my start.
Definition: v40_Header.cxx:72
offline_eformat::v40::FullEventFragment::event_filter_info
const uint32_t * event_filter_info() const
Returns an iterator to the first of the EF info words.
Definition: v40_FullEventFragment.cxx:83
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
offline_eformat::v40::FullEventFragment::lvl1_trigger_info
const uint32_t * lvl1_trigger_info() const
Returns an iterator to the first of the LVL1 trigger info words.
Definition: v40_FullEventFragment.cxx:73
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:99
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::Header::nstatus
uint32_t nstatus() const
Returns the number of status words available.
Definition: v40_Header.cxx:67
offline_eformat::v40::FullEventFragment::stream_tag
const uint32_t * stream_tag() const
Returns an iterator to the first of the stream tag words.
Definition: v40_FullEventFragment.cxx:88