ATLAS Offline Software
v40_write_ROBFragment.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_ROBFRAGMENT_H
19 #define OFFLINE_EFORMAT_V40_WRITE_ROBFRAGMENT_H
20 
21 #include "eformat/write/node.h"
22 #include "eformat/Version.h"
24 
25 namespace offline_eformat {
26 
27  namespace v40_write {
28 
29  class FullEventFragment; //forward
30 
35  {
36  public:
37 
56  uint32_t run_no,
57  uint32_t lvl1_id,
58  uint32_t bc_id,
59  uint32_t lvl1_type,
60  uint32_t detev_type,
61  uint32_t ndata,
62  const uint32_t* data,
64 
85  uint32_t run_no,
86  uint32_t lvl1_id,
87  uint32_t bc_id,
88  uint32_t lvl1_type,
89  uint32_t detev_type,
90  uint32_t ndata,
91  const uint32_t* data,
93 
101  ROBFragment ();
102 
118  ROBFragment (const ROBFragment& other);
119 
129 
142  ROBFragment (const uint32_t* rob);
143 
147  virtual ~ROBFragment ();
148 
164 
180  void copy_header(const uint32_t* other);
181  void copy_header(const ROBFragment& other);
182 
191  void status (uint32_t n, const uint32_t* status);
192 
196  inline uint32_t nstatus (void) const { return m_node[0].base[5]; }
197 
201  inline const uint32_t* status (void) const { return m_node[1].base; }
202 
208  inline void minor_version (uint16_t v)
209  { m_node[0].base[3] &= 0xffff0000;
210  m_node[0].base[3] |= v; }
211 
215  inline uint16_t minor_version (void) const
216  { return 0xffff & m_node[0].base[3]; }
217 
226  void rod_status (uint32_t n, const uint32_t* status);
227 
231  inline uint32_t rod_nstatus (void) const { return m_node[6].base[0]; }
232 
237  inline const uint32_t* rod_status (void) const { return m_node[4].base; }
238 
245  void status_position (uint32_t v);
246 
250  inline uint32_t status_position (void) const
251  { return m_node[6].base[2]; }
252 
259  { m_node[3].base[2] = eformat::DEFAULT_ROD_VERSION | v; }
260 
264  inline uint16_t rod_minor_version (void) const
265  { return 0xffff & m_node[3].base[2]; }
266 
275  void rod_data (uint32_t n, const uint32_t* data);
276 
280  inline uint32_t rod_ndata (void) const { return m_node[6].base[1]; }
281 
285  inline const uint32_t* rod_data (void) const { return m_node[5].base; }
286 
294  inline void source_id (uint32_t s)
295  { m_node[0].base[4] = m_node[3].base[3] = s; }
296 
302  inline void rod_source_id (uint32_t s) { m_node[3].base[3] = s; }
303 
309  inline void rob_source_id (uint32_t s) { m_node[0].base[4] = s; }
310 
316  inline uint32_t source_id (void) const { return m_node[0].base[4]; }
317 
321  inline uint32_t rob_source_id (void) const { return source_id(); }
322 
326  inline uint32_t rod_source_id (void) const { return m_node[3].base[3]; }
327 
337  void checksum_type (uint32_t s);
338 
342  inline uint32_t checksum_type (void) const { return m_node[2].base[0]; }
343 
349  inline void rod_run_no (uint32_t s)
350  { m_node[3].base[4] = (s & 0x7fffffff); }
351 
355  inline uint32_t rod_run_no (void) const
356  { return m_node[3].base[4]; }
357 
363  inline void rod_lvl1_id (uint32_t s)
364  { m_node[3].base[5] = s; }
365 
369  inline uint32_t rod_lvl1_id (void) const
370  { return m_node[3].base[5]; }
371 
377  inline void rod_bc_id (uint32_t s)
378  { m_node[3].base[6] = s; }
379 
383  inline uint32_t rod_bc_id (void) const
384  { return m_node[3].base[6]; }
385 
391  inline void rod_lvl1_type (uint32_t s)
392  { m_node[3].base[7] = s; }
393 
397  inline uint32_t rod_lvl1_type (void) const
398  { return m_node[3].base[7]; }
399 
405  inline void rod_detev_type (uint32_t s)
406  { m_node[3].base[8] = s; }
407 
411  inline uint32_t rod_detev_type (void) const
412  { return m_node[3].base[8]; }
413 
419  inline uint32_t meta_size_word (void) const
423 
427  inline uint32_t size_word (void) const
428  { return meta_size_word() + rod_ndata(); }
429 
433  inline uint32_t rob_header_size_word (void) const
434  { return 7 + m_node[0].base[5]; }
435 
439  inline uint32_t rob_trailer_size_word (void) const
440  { return (checksum_type()?1:0); }
441 
445  inline uint32_t page_count (void) const
446  { return 7 + (checksum_type()?1:0); }
447 
451  inline uint32_t rod_page_count (void) const { return 4; }
452 
456  inline const uint32_t* rod_header (void) const
457  { return m_node[3].base; }
458 
462  inline uint32_t rod_header_size_word (void) const
463  { return m_node[3].size_word; }
464 
468  inline const uint32_t* rod_trailer (void) const
469  { return m_node[6].base; }
470 
474  inline uint32_t rod_trailer_size_word (void) const
475  { return m_node[6].size_word; }
476 
481  eformat::write::node_t* bind (void);
482 
487  const eformat::write::node_t* rod_bind (void);
488 
495  { m_parent = ros; }
496 
500  inline const v40_write::FullEventFragment* parent (void) const { return m_parent; }
501 
507  inline void next (ROBFragment* n) { m_next = n; }
508 
512  inline const ROBFragment* next (void) const { return m_next; }
513  inline ROBFragment* next (void) { return m_next; }
514 
515  private: //to make the code simpler
516 
521  void initialize(void);
522 
523  private: //representation
524 
529  eformat::write::node_t m_node[8];
532 
533  };
534 
535  }
536 
537 }
538 
539 #endif /* OFFLINE_EFORMAT_V40_WRITE_ROBFRAGMENT_H */
offline_eformat::v40_write::ROBFragment::status
const uint32_t * status(void) const
Returns a pointer to the first status word to be used by this fragment.
Definition: v40_write_ROBFragment.h:201
offline_eformat::v40_write::ROBFragment::minor_version
void minor_version(uint16_t v)
Changes the minor version number of the fragment.
Definition: v40_write_ROBFragment.h:208
offline_eformat::v40_write::ROBFragment::rod_detev_type
void rod_detev_type(uint32_t s)
Changes the detector event type in the ROD fragment.
Definition: v40_write_ROBFragment.h:405
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
offline_eformat::v40_write::ROBFragment::next
ROBFragment * next(void)
Definition: v40_write_ROBFragment.h:513
offline_eformat::v40_write::ROBFragment::next
const ROBFragment * next(void) const
Returns the next sibling.
Definition: v40_write_ROBFragment.h:512
offline_eformat::v40_write::ROBFragment::nstatus
uint32_t nstatus(void) const
Returns the number of status wors in this fragment.
Definition: v40_write_ROBFragment.h:196
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
offline_eformat::v40_write::ROBFragment::rod_data
const uint32_t * rod_data(void) const
Returns a pointer to the first of the data words at the ROD fragment.
Definition: v40_write_ROBFragment.h:285
offline_eformat::v40_write::ROBFragment::rod_page_count
uint32_t rod_page_count(void) const
Returns the number of pages of memory I have for the ROD fragment.
Definition: v40_write_ROBFragment.h:451
offline_eformat::v40_write::ROBFragment::next
void next(ROBFragment *n)
Sets the next sibling.
Definition: v40_write_ROBFragment.h:507
offline_eformat::v40_write::ROBFragment::m_rod_header
uint32_t m_rod_header[9]
The ROD Header.
Definition: v40_write_ROBFragment.h:526
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
offline_eformat::v40_write::ROBFragment::rod_trailer_size_word
uint32_t rod_trailer_size_word(void) const
Returns the size of a ROD header.
Definition: v40_write_ROBFragment.h:474
offline_eformat::v40_write::ROBFragment::size_word
uint32_t size_word(void) const
Returns the total size for this fragment, in words.
Definition: v40_write_ROBFragment.h:427
offline_eformat::v40_write::ROBFragment::page_count
uint32_t page_count(void) const
Returns the number of pages of memory I have.
Definition: v40_write_ROBFragment.h:445
offline_eformat
Definition: util.h:19
offline_eformat::v40_write::ROBFragment::rod_minor_version
uint16_t rod_minor_version(void) const
Gets the minor version number of the underlying ROD fragment.
Definition: v40_write_ROBFragment.h:264
offline_eformat::v40_write::ROBFragment::parent
void parent(v40_write::FullEventFragment *ros)
This sets the parent fragment.
Definition: v40_write_ROBFragment.h:494
offline_eformat::v40_write::ROBFragment::rod_minor_version
void rod_minor_version(uint16_t v)
Changes the minor version number of the underlying ROD fragment.
Definition: v40_write_ROBFragment.h:258
offline_eformat::v40_write::ROBFragment::rod_detev_type
uint32_t rod_detev_type(void) const
Returns the detector event type identifier for the ROD fragment.
Definition: v40_write_ROBFragment.h:411
offline_eformat::v40_write::ROBFragment::minor_version
uint16_t minor_version(void) const
Returns the minor version number of the fragment.
Definition: v40_write_ROBFragment.h:215
offline_eformat::v40_write::ROBFragment::rod_lvl1_type
uint32_t rod_lvl1_type(void) const
Returns the lvl1 event type identifier for the ROD fragment.
Definition: v40_write_ROBFragment.h:397
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment
eformat::FullEventFragment< PointerType > FullEventFragment
Definition: RawEvent.h:26
offline_eformat::v40_write::ROBFragment::checksum_type
uint32_t checksum_type(void) const
Returns the check sum type for this fragment.
Definition: v40_write_ROBFragment.h:342
offline_eformat::v40_write::ROBFragment::m_next
v40_write::ROBFragment * m_next
Next sibling.
Definition: v40_write_ROBFragment.h:531
offline_eformat::v40_write::ROBFragment::rod_run_no
void rod_run_no(uint32_t s)
Changes the run number for the ROD fragment.
Definition: v40_write_ROBFragment.h:349
offline_eformat::v40_write::ROBFragment::operator=
ROBFragment & operator=(const ROBFragment &other)
Assignment operator.
Definition: v40_write_ROBFragment.cxx:187
offline_eformat::v40_write::ROBFragment::meta_size_word
uint32_t meta_size_word(void) const
Returns the total size for the meta data (everything that does not encompass the contents of the m_da...
Definition: v40_write_ROBFragment.h:419
offline_eformat::v40_write::ROBFragment::rod_lvl1_id
void rod_lvl1_id(uint32_t s)
Changes the lvl1 identifier in the ROD fragment.
Definition: v40_write_ROBFragment.h:363
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
offline_eformat::v40_write::ROBFragment::status_position
uint32_t status_position(void) const
Returns the current status position.
Definition: v40_write_ROBFragment.h:250
offline_eformat::v40_write::ROBFragment::rod_lvl1_id
uint32_t rod_lvl1_id(void) const
Returns the lvl1 identifier for the ROD fragment.
Definition: v40_write_ROBFragment.h:369
offline_eformat::v40_write::ROBFragment::m_rod_trailer
uint32_t m_rod_trailer[3]
The ROD trailer.
Definition: v40_write_ROBFragment.h:527
offline_eformat::v40_write::ROBFragment::rod_nstatus
uint32_t rod_nstatus(void) const
Returns the number of status wors in this fragment.
Definition: v40_write_ROBFragment.h:231
beamspotman.n
n
Definition: beamspotman.py:731
offline_eformat::v40_write::ROBFragment::rod_bc_id
uint32_t rod_bc_id(void) const
Returns the bunch crossing identifier for the ROD fragment.
Definition: v40_write_ROBFragment.h:383
offline_eformat::v40_write::ROBFragment::rod_bc_id
void rod_bc_id(uint32_t s)
Changes the bunch crossing identifier in the ROD fragment.
Definition: v40_write_ROBFragment.h:377
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::ROBFragment::rod_source_id
void rod_source_id(uint32_t s)
Changes the source identifier for only the ROD fragment.
Definition: v40_write_ROBFragment.h:302
offline_eformat::v40_write::ROBFragment::parent
const v40_write::FullEventFragment * parent(void) const
This returns the parent fragment.
Definition: v40_write_ROBFragment.h:500
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
offline_eformat::v40_write::ROBFragment::~ROBFragment
virtual ~ROBFragment()
Base destructor.
Definition: v40_write_ROBFragment.cxx:182
offline_eformat::v40_write::ROBFragment::rob_trailer_size_word
uint32_t rob_trailer_size_word(void) const
Returns the total size of the ROB header.
Definition: v40_write_ROBFragment.h:439
offline_eformat::v40_write::ROBFragment::source_id
uint32_t source_id(void) const
Returns the source identifier of the ROB fragment.
Definition: v40_write_ROBFragment.h:316
offline_eformat::v40_write::ROBFragment::rod_run_no
uint32_t rod_run_no(void) const
Returns the run number for the ROD fragment.
Definition: v40_write_ROBFragment.h:355
offline_eformat::v40_write::ROBFragment::m_parent
v40_write::FullEventFragment * m_parent
My parent.
Definition: v40_write_ROBFragment.h:530
offline_eformat::v40_write::ROBFragment::rod_lvl1_type
void rod_lvl1_type(uint32_t s)
Changes the lvl1 trigger type in the ROD fragment.
Definition: v40_write_ROBFragment.h:391
offline_eformat::v40_write::ROBFragment::rob_header_size_word
uint32_t rob_header_size_word(void) const
Returns the total size of the ROB header.
Definition: v40_write_ROBFragment.h:433
offline_eformat::v40_write::ROBFragment::rod_header
const uint32_t * rod_header(void) const
Returns a pointer to the ROD header.
Definition: v40_write_ROBFragment.h:456
offline_eformat::v40_write::ROBFragment::m_checksum
uint32_t m_checksum
The ROB trailer.
Definition: v40_write_ROBFragment.h:528
offline_eformat::v40_write::ROBFragment::m_node
eformat::write::node_t m_node[8]
Node representation.
Definition: v40_write_ROBFragment.h:529
python.PyAthena.v
v
Definition: PyAthena.py:154
offline_eformat::v40_write::ROBFragment::rod_source_id
uint32_t rod_source_id(void) const
Returns the source identifier of the ROD fragment.
Definition: v40_write_ROBFragment.h:326
offline_eformat::v40_write::ROBFragment::ROBFragment
ROBFragment()
Builds a new "empty" ROB fragment, otherwise invalid.
Definition: v40_write_ROBFragment.cxx:133
offline_eformat::v40_write::ROBFragment::rod_ndata
uint32_t rod_ndata(void) const
Returns the number of data words at the ROD fragment.
Definition: v40_write_ROBFragment.h:280
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
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::ROBFragment::initialize
void initialize(void)
Initializes the internal fields of this ROB fragment with the standard values.
Definition: v40_write_ROBFragment.cxx:37
offline_eformat::v40_write::ROBFragment::rob_source_id
void rob_source_id(uint32_t s)
Changes the source identifier for only the ROB fragment.
Definition: v40_write_ROBFragment.h:309
offline_eformat::v40_write::ROBFragment::rod_trailer
const uint32_t * rod_trailer(void) const
Returns a pointer to the ROD trailer.
Definition: v40_write_ROBFragment.h:468
offline_eformat::v40_write::ROBFragment::rod_bind
const eformat::write::node_t * rod_bind(void)
Outputs a concatenation of eformat::write::node making up a list with the contents of the underlying ...
Definition: v40_write_ROBFragment.cxx:352
offline_eformat::v40_write::ROBFragment::bind
eformat::write::node_t * bind(void)
Outputs a concatenation of eformat::write::node making up a list with the contents of this ROB fragme...
Definition: v40_write_ROBFragment.cxx:358
offline_eformat::v40_write::ROBFragment::rod_header_size_word
uint32_t rod_header_size_word(void) const
Returns the size of a ROD header.
Definition: v40_write_ROBFragment.h:462
offline_eformat::v40_write::ROBFragment::rod_status
const uint32_t * rod_status(void) const
Returns a pointer to the first ROD status word to be used by this fragment.
Definition: v40_write_ROBFragment.h:237
checker_macros.h
Define macros for attributes used to control the static checker.
offline_eformat::v40_write::ROBFragment::rob_source_id
uint32_t rob_source_id(void) const
Returns the source identifier of the ROB fragment.
Definition: v40_write_ROBFragment.h:321
offline_eformat::v40_write::ROBFragment::m_header
uint32_t m_header[7]
The ROB Header.
Definition: v40_write_ROBFragment.h:525
offline_eformat::v40_write::ROBFragment::copy_header
void copy_header(const uint32_t *other)
Copies the header (meta data information) from another ROBFragment.
Definition: v40_write_ROBFragment.cxx:195
offline_eformat::v40_write::ROBFragment::source_id
void source_id(uint32_t s)
Changes the source identifier for both the ROB and the ROD fragments.
Definition: v40_write_ROBFragment.h:294