ATLAS Offline Software
v40_write_FullEventFragment.h
Go to the documentation of this file.
1 //Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
18 #ifndef OFFLINE_EFORMAT_V40_WRITE_FULLEVENTFRAGMENT_H
19 #define OFFLINE_EFORMAT_V40_WRITE_FULLEVENTFRAGMENT_H
20 
21 #include "v40_write_ROBFragment.h"
23 #include <cstring>
24 
25 namespace offline_eformat {
26 
27  namespace v40_write {
28 
34 
39  {
40  public:
41 
62  uint32_t lvl1_id, uint16_t bc_id, uint8_t lvl1_type);
63 
70  FullEventFragment (const uint32_t* fe);
71 
77 
80 
84  virtual ~FullEventFragment ();
85 
99  void copy_header(const uint32_t* other);
100  void copy_header(const FullEventFragment& other);
101 
110  void status (uint32_t n, const uint32_t* status);
111 
115  inline uint32_t nstatus (void) const { return m_node[0].base[5]; }
116 
120  inline const uint32_t* status (void) const { return m_node[1].base; }
121 
127  inline void minor_version (uint16_t v) {
128  eformat::helper::Version version(v, eformat::MAJOR_V40_VERSION);
129  m_node[0].base[3] = version.code();
130  }
131 
135  inline uint16_t minor_version (void) const
136  { return 0xffff & m_node[0].base[3]; }
137 
143  inline void source_id (uint32_t s)
144  { m_node[0].base[4] = s; }
145 
149  inline uint32_t source_id (void) const
150  { return m_node[0].base[4]; }
151 
160  void checksum_type (uint32_t s);
161 
165  inline uint32_t checksum_type (void) const { return m_node[2].base[0]; }
166 
173  inline void bc_time_seconds (uint32_t s)
174  { m_node[2].base[1] = s; }
175 
183  { m_node[2].base[2] = s; }
184 
189  inline uint32_t bc_time_seconds (void) const
190  { return m_node[2].base[1]; }
191 
196  inline uint32_t bc_time_nanoseconds (void) const
197  { return m_node[2].base[2]; }
198 
204  inline void global_id (uint32_t s)
205  { m_node[2].base[3] = s; }
206 
210  inline uint32_t global_id (void) const
211  { return m_node[2].base[3]; }
212 
218  inline void run_type (uint32_t s)
219  { m_node[2].base[4] = s; }
220 
224  inline uint32_t run_type (void) const
225  { return m_node[2].base[4]; }
226 
232  inline void run_no (uint32_t s)
233  { m_node[2].base[5] = s; }
234 
238  inline uint32_t run_no (void) const
239  { return m_node[2].base[5]; }
240 
246  inline void lumi_block (uint16_t s)
247  { m_node[2].base[6] = s; }
248 
252  inline uint16_t lumi_block (void) const
253  { return m_node[2].base[6]; }
254 
260  inline void lvl1_id (uint32_t s)
261  { m_node[2].base[7] = s; }
262 
266  inline uint32_t lvl1_id (void) const
267  { return m_node[2].base[7]; }
268 
274  inline void bc_id (uint16_t s)
275  { m_node[2].base[8] = s; }
276 
280  inline uint16_t bc_id (void) const
281  { return m_node[2].base[8]; }
282 
288  inline void lvl1_trigger_type (uint8_t s)
289  { m_node[2].base[9] = s; }
290 
294  inline uint8_t lvl1_trigger_type (void) const
295  { return m_node[2].base[9]; }
296 
304  void lvl1_trigger_info (uint32_t n, const uint32_t* data);
305 
309  inline uint32_t nlvl1_trigger_info (void) const
310  { return m_node[2].base[10]; }
311 
316  inline const uint32_t* lvl1_trigger_info (void) const
317  { return m_node[3].base; }
318 
326  void lvl2_trigger_info (uint32_t n, const uint32_t* data);
327 
331  inline uint32_t nlvl2_trigger_info (void) const
332  { return m_node[4].base[0]; }
333 
338  inline const uint32_t* lvl2_trigger_info (void) const
339  { return m_node[5].base; }
340 
348  void event_filter_info (uint32_t n, const uint32_t* data);
349 
353  inline uint32_t nevent_filter_info (void) const
354  { return m_node[6].base[0]; }
355 
360  inline const uint32_t* event_filter_info (void) const
361  { return m_node[7].base; }
362 
368  inline uint32_t nstream_tag (void) const
369  { return m_node[8].base[0]; }
370 
380  void stream_tag (uint32_t n, const uint32_t* data);
381 
387  inline const uint32_t* stream_tag (void) const { return m_node[9].base; }
388 
392  inline uint32_t meta_size_word (void) const
393  { return m_node[0].base[2] + (checksum_type()?1:0); }
394 
398  inline uint32_t size_word (void) const
399  { return m_node[0].base[1]; }
400 
414  void append (v40_write::ROBFragment* rob);
415 
436  void append_unchecked (const uint32_t* rob);
437 
441  inline uint32_t nunchecked_fragments (void) const
442  { return m_n_unchecked; }
443 
451  const uint32_t* unchecked_fragment (uint32_t n) const;
452 
458  inline const v40_write::ROBFragment* first_child (void) const
459  { return m_child; }
460 
468  inline void size_change (uint32_t o, uint32_t n)
469  { m_node[0].base[1] -= o; m_node[0].base[1] += n; }
470 
480  uint32_t page_count (void) const;
481 
487  const eformat::write::node_t* bind (void);
488 
489  private: //to make the code simpler
490 
495  void initialize(void);
496 
497  private: //representation
498 
500  eformat::write::node_t m_node[12];
505  eformat::write::node_t m_unchecked[MAX_UNCHECKED_FRAGMENTS];
506 
507  };
508 
509  }
510 
511 }
512 
513 #endif /* EFORMAT_WRITE_FULLEVENTFRAGMENT_H */
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
offline_eformat::v40_write::FullEventFragment::lvl1_id
uint32_t lvl1_id(void) const
Returns the lvl1 identifier for this fragment.
Definition: v40_write_FullEventFragment.h:266
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
offline_eformat::v40_write::FullEventFragment::m_checksum
uint32_t m_checksum
My payload's checksum, if asked.
Definition: v40_write_FullEventFragment.h:503
offline_eformat::v40_write::FullEventFragment::m_unchecked
eformat::write::node_t m_unchecked[MAX_UNCHECKED_FRAGMENTS]
Unchecked nodes.
Definition: v40_write_FullEventFragment.h:505
offline_eformat::v40_write::FullEventFragment::operator=
FullEventFragment & operator=(const FullEventFragment &other)=delete
offline_eformat::v40_write::FullEventFragment::bc_time_nanoseconds
uint32_t bc_time_nanoseconds(void) const
Returns the additional amount of nanoseconds, for this fragment's bunch crossing time.
Definition: v40_write_FullEventFragment.h:196
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
offline_eformat::v40_write::FullEventFragment::FullEventFragment
FullEventFragment()
Builds a new empty FullEventFragment, otherwise invalid.
Definition: v40_write_FullEventFragment.cxx:109
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
offline_eformat::v40_write::FullEventFragment::nlvl1_trigger_info
uint32_t nlvl1_trigger_info(void) const
Returns the number of status wors in this fragment.
Definition: v40_write_FullEventFragment.h:309
offline_eformat::v40_write::FullEventFragment::m_last
v40_write::ROBFragment * m_last
my last child
Definition: v40_write_FullEventFragment.h:502
offline_eformat::v40_write::FullEventFragment::m_header
uint32_t m_header[20]
The FullEvent Header.
Definition: v40_write_FullEventFragment.h:499
offline_eformat::v40_write::FullEventFragment::copy_header
void copy_header(const uint32_t *other)
Copies the header (meta data information) from another existing FullEvent Fragment.
Definition: v40_write_FullEventFragment.cxx:118
offline_eformat
Definition: util.h:19
offline_eformat::v40_write::FullEventFragment::global_id
void global_id(uint32_t s)
Changes the global identifier for this event.
Definition: v40_write_FullEventFragment.h:204
offline_eformat::v40_write::MAX_UNCHECKED_FRAGMENTS
const uint32_t MAX_UNCHECKED_FRAGMENTS
Maximum number of unchecked fragments a writeable FullEventFragment may have.
Definition: v40_write_FullEventFragment.h:33
offline_eformat::v40_write::FullEventFragment::stream_tag
const uint32_t * stream_tag(void) const
Returns a pointer to the first stream tag word to be used by this fragment.
Definition: v40_write_FullEventFragment.h:387
offline_eformat::v40_write::FullEventFragment::lvl1_trigger_type
uint8_t lvl1_trigger_type(void) const
Returns the lvl1 trigger type for this fragment.
Definition: v40_write_FullEventFragment.h:294
offline_eformat::v40_write::FullEventFragment::append_unchecked
void append_unchecked(const uint32_t *rob)
Appends an unchecked (read-only) ROB fragment to the current FullEvent.
Definition: v40_write_FullEventFragment.cxx:253
offline_eformat::v40_write::FullEventFragment::bc_time_nanoseconds
void bc_time_nanoseconds(uint32_t s)
Changes the bunch crossing time (the nanoseconds part) this fragment was produced at.
Definition: v40_write_FullEventFragment.h:182
offline_eformat::v40_write::FullEventFragment::bind
const eformat::write::node_t * bind(void)
Returns the first node of a list of nodes that represent the fragment you have constructed.
Definition: v40_write_FullEventFragment.cxx:273
offline_eformat::v40_write::FullEventFragment::minor_version
void minor_version(uint16_t v)
Changes the minor version number of the fragment.
Definition: v40_write_FullEventFragment.h:127
offline_eformat::v40_write::FullEventFragment::bc_id
uint16_t bc_id(void) const
Returns the bunch crossing identifier for this fragment.
Definition: v40_write_FullEventFragment.h:280
offline_eformat::v40_write::FullEventFragment::lvl1_trigger_type
void lvl1_trigger_type(uint8_t s)
Changes the lvl1 trigger type in this fragment.
Definition: v40_write_FullEventFragment.h:288
offline_eformat::v40_write::FullEventFragment::nlvl2_trigger_info
uint32_t nlvl2_trigger_info(void) const
Returns the number of status wors in this fragment.
Definition: v40_write_FullEventFragment.h:331
offline_eformat::v40_write::FullEventFragment::size_change
void size_change(uint32_t o, uint32_t n)
This method is used by children of this fragment to notify fragment size changes.
Definition: v40_write_FullEventFragment.h:468
offline_eformat::v40_write::FullEventFragment::nevent_filter_info
uint32_t nevent_filter_info(void) const
Returns the number of status wors in this fragment.
Definition: v40_write_FullEventFragment.h:353
offline_eformat::v40_write::FullEventFragment::checksum_type
uint32_t checksum_type(void) const
Returns the check sum type of this fragment.
Definition: v40_write_FullEventFragment.h:165
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
offline_eformat::v40_write::FullEventFragment::FullEventFragment
FullEventFragment(const FullEventFragment &other)=delete
offline_eformat::v40_write::FullEventFragment::m_child
v40_write::ROBFragment * m_child
my children
Definition: v40_write_FullEventFragment.h:501
offline_eformat::v40_write::FullEventFragment::source_id
void source_id(uint32_t s)
Changes the source identifier for this fragment.
Definition: v40_write_FullEventFragment.h:143
offline_eformat::v40_write::FullEventFragment::run_type
uint32_t run_type(void) const
Returns the run type for this fragment.
Definition: v40_write_FullEventFragment.h:224
beamspotman.n
n
Definition: beamspotman.py:731
offline_eformat::v40_write::FullEventFragment::initialize
void initialize(void)
Initializes the internal fields of this ROB fragment with the standard values.
Definition: v40_write_FullEventFragment.cxx:25
offline_eformat::v40_write::FullEventFragment::bc_time_seconds
uint32_t bc_time_seconds(void) const
Returns the time since the (unix) origin, in seconds, for this fragment.
Definition: v40_write_FullEventFragment.h:189
offline_eformat::v40_write::FullEventFragment
Defines a helper class to aid the creation of FullEvent fragments.
Definition: v40_write_FullEventFragment.h:39
offline_eformat::v40_write::FullEventFragment::run_no
uint32_t run_no(void) const
Returns the run number for this fragment.
Definition: v40_write_FullEventFragment.h:238
offline_eformat::v40_write::FullEventFragment::bc_time_seconds
void bc_time_seconds(uint32_t s)
Changes the bunch crossing time (seconds) this fragment was produced at.
Definition: v40_write_FullEventFragment.h:173
offline_eformat::v40_write::FullEventFragment::source_id
uint32_t source_id(void) const
Returns the source identifier of this fragment.
Definition: v40_write_FullEventFragment.h:149
offline_eformat::v40_write::FullEventFragment::status
const uint32_t * status(void) const
Returns a pointer to the first status word to be used by this fragment.
Definition: v40_write_FullEventFragment.h:120
offline_eformat::v40_write::FullEventFragment::meta_size_word
uint32_t meta_size_word(void) const
Returns the size of this fragments header.
Definition: v40_write_FullEventFragment.h:392
offline_eformat::v40_write::FullEventFragment::first_child
const v40_write::ROBFragment * first_child(void) const
This returns the first child of this fragment.
Definition: v40_write_FullEventFragment.h:458
offline_eformat::v40_write::FullEventFragment::unchecked_fragment
const uint32_t * unchecked_fragment(uint32_t n) const
Returns a particular unchecked ROB fragment.
Definition: v40_write_FullEventFragment.cxx:327
offline_eformat::v40_write::FullEventFragment::m_node
eformat::write::node_t m_node[12]
Node representation.
Definition: v40_write_FullEventFragment.h:500
offline_eformat::v40_write::FullEventFragment::append
void append(v40_write::ROBFragment *rob)
Appends a new ROB fragment to this FullEvent fragment.
Definition: v40_write_FullEventFragment.cxx:241
python.PyAthena.v
v
Definition: PyAthena.py:154
get_generator_info.version
version
Definition: get_generator_info.py:33
offline_eformat::v40_write::FullEventFragment::run_no
void run_no(uint32_t s)
Changes the run number.
Definition: v40_write_FullEventFragment.h:232
offline_eformat::v40_write::FullEventFragment::nunchecked_fragments
uint32_t nunchecked_fragments(void) const
Returns the number of unchecked ROBs there are.
Definition: v40_write_FullEventFragment.h:441
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
offline_eformat::v40_write::FullEventFragment::run_type
void run_type(uint32_t s)
Changes the run type.
Definition: v40_write_FullEventFragment.h:218
offline_eformat::v40_write::FullEventFragment::m_n_unchecked
uint32_t m_n_unchecked
The number of unchecked nodes attached.
Definition: v40_write_FullEventFragment.h:504
offline_eformat::v40_write::FullEventFragment::lumi_block
void lumi_block(uint16_t s)
Changes the luminosity block number.
Definition: v40_write_FullEventFragment.h:246
offline_eformat::v40_write::FullEventFragment::page_count
uint32_t page_count(void) const
Returns the total number of (raw memory) pages this fragment is composed of.
Definition: v40_write_FullEventFragment.cxx:264
offline_eformat::v40_write::ROBFragment
Defines a helper class to aid the creation of ROB fragments.
Definition: v40_write_ROBFragment.h:35
offline_eformat::v40_write::FullEventFragment::nstatus
uint32_t nstatus(void) const
Returns the number of status wors in this fragment.
Definition: v40_write_FullEventFragment.h:115
offline_eformat::v40_write::FullEventFragment::global_id
uint32_t global_id(void) const
Returns the global identifier for this event.
Definition: v40_write_FullEventFragment.h:210
offline_eformat::v40_write::FullEventFragment::lvl2_trigger_info
const uint32_t * lvl2_trigger_info(void) const
Returns a pointer to the first LVL2 trigger info to be used by this fragment.
Definition: v40_write_FullEventFragment.h:338
offline_eformat::v40_write::FullEventFragment::lvl1_id
void lvl1_id(uint32_t s)
Changes the lvl1 identifier in this fragment.
Definition: v40_write_FullEventFragment.h:260
offline_eformat::v40_write::FullEventFragment::nstream_tag
uint32_t nstream_tag(void) const
Returns the number of stream tag words in this fragment.
Definition: v40_write_FullEventFragment.h:368
checker_macros.h
Define macros for attributes used to control the static checker.
offline_eformat::v40_write::FullEventFragment::bc_id
void bc_id(uint16_t s)
Changes the bunch crossing identifier in this fragment.
Definition: v40_write_FullEventFragment.h:274
offline_eformat::v40_write::FullEventFragment::minor_version
uint16_t minor_version(void) const
Returns the minor version number of the fragment.
Definition: v40_write_FullEventFragment.h:135
offline_eformat::v40_write::FullEventFragment::event_filter_info
const uint32_t * event_filter_info(void) const
Returns a pointer to the first EF trigger info to be used by this fragment.
Definition: v40_write_FullEventFragment.h:360
offline_eformat::v40_write::FullEventFragment::lumi_block
uint16_t lumi_block(void) const
Returns the luminosity block number for this fragment.
Definition: v40_write_FullEventFragment.h:252
v40_write_ROBFragment.h
offline_eformat::v40_write::FullEventFragment::~FullEventFragment
virtual ~FullEventFragment()
Base destructor.
Definition: v40_write_FullEventFragment.cxx:114
offline_eformat::v40_write::FullEventFragment::lvl1_trigger_info
const uint32_t * lvl1_trigger_info(void) const
Returns a pointer to the first LVL1 trigger info to be used by this fragment.
Definition: v40_write_FullEventFragment.h:316
offline_eformat::v40_write::FullEventFragment::size_word
uint32_t size_word(void) const
Returns the total size for this fragment, in words.
Definition: v40_write_FullEventFragment.h:398