ATLAS Offline Software
Loading...
Searching...
No Matches
v40_ROBFragment.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7
18
19#ifndef OFFLINE_EFORMAT_V40_ROBFRAGMENT_H
20#define OFFLINE_EFORMAT_V40_ROBFRAGMENT_H
21
22#include <vector>
23
24#include "v40_Header.h"
25#include "eformat/blob.h"
26#include "eformat/Version.h"
27#include "eformat/Problem.h"
28
29namespace offline_eformat { namespace v40 {
30
35 class ROBFragment : public Header {
36
37 public: //interface
38
45 ROBFragment (const uint32_t* it);
46
52 ROBFragment (const ROBFragment& other);
53
57 ROBFragment ();
58
67 ROBFragment (const eformat::helper::u32list& blob);
68
77 ROBFragment (const eformat::helper::u32slice& blob);
78
82 virtual ~ROBFragment();
83
89 ROBFragment& operator= (const ROBFragment& other);
90
96 ROBFragment& assign (const uint32_t* it);
97
98
102 bool check_rob (const uint16_t version=eformat::MAJOR_V40_VERSION) const;
103
107 bool check_rob_noex (const uint16_t version=eformat::MAJOR_V40_VERSION) const;
108
112 bool check_rob_impl
113 (const uint16_t version=eformat::MAJOR_V40_VERSION,
114 const bool exc = true) const;
115
119 bool check_rod_noex
120 (const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const;
121
125 bool check_rod
126 (const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const;
127
132 bool check_rod_impl
133 (const uint16_t rod_version=eformat::MAJOR_V31_VERSION,
134 const bool exc = true) const;
135
139 bool check(const uint16_t version=eformat::MAJOR_V40_VERSION,
140 const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const;
141
145 bool check_noex (const uint16_t version=eformat::MAJOR_V40_VERSION,
146 const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const;
147
148
152 bool check_impl
153 (const uint16_t version=eformat::MAJOR_V40_VERSION,
154 const uint16_t rod_version=eformat::MAJOR_V31_VERSION,
155 const bool exc = true) const;
156
160 void problems (std::vector<eformat::FragmentProblem>& p,
161 const uint16_t version=eformat::MAJOR_V40_VERSION,
162 const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const;
163
167 void rob_problems (std::vector<eformat::FragmentProblem>& p,
168 const uint16_t version=eformat::MAJOR_V40_VERSION) const;
169
173 void rod_problems (std::vector<eformat::FragmentProblem>& p,
174 const uint16_t version=eformat::MAJOR_V31_VERSION) const;
175
179 uint32_t rob_source_id () const;
180
186 const uint32_t* rod_start() const;
187 inline void rod_start (const uint32_t*& it) const //legacy
188 { it = rod_start(); }
189
193 uint32_t rod_marker() const;
194
198 uint32_t rod_fragment_size_word() const;
199
204 uint32_t rod_header_size_word() const;
205
209 uint32_t rod_trailer_size_word() const;
210
214 uint32_t rod_version() const;
215
219 uint32_t rod_source_id() const;
220
224 uint32_t rod_run_no() const;
225
229 uint32_t rod_lvl1_id() const;
230
234 uint32_t rod_bc_id() const;
235
239 uint32_t rod_lvl1_trigger_type() const;
240
244 uint32_t rod_detev_type() const;
245
249 uint32_t rod_nstatus () const;
250
257 const uint32_t* rod_status() const;
258 inline void rod_status (const uint32_t*& it) const //legacy
259 { it = rod_status(); }
260
264 uint32_t rod_ndata () const;
265
271 const uint32_t* rod_data() const;
272 void rod_data (const uint32_t*& it) const //legacy
273 { it = rod_data(); }
274
280 uint32_t rod_status_position () const;
281
285 virtual uint32_t nchildren () const;
286
295 const uint32_t* child(size_t n) const;
296 virtual inline void child (const uint32_t*& p, size_t n) const //legacy
297 { p = child(n); }
298
309 virtual uint32_t children (const uint32_t** p, size_t max) const;
310
311 private: //representation
312
313 const uint32_t* m_start;
314
315 };
316
317}}
318
319#endif /* OFFLINE_EFORMAT_V40_ROBFRAGMENT_H */
#define max(a, b)
Definition cfImp.cxx:41
Header(const uint32_t *it)
To build a header given the containing buffer.
uint32_t version() const
Returns the formatting version.
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.
uint32_t rod_version() const
Returns the formatting version for the ROD fragment.
const uint32_t * m_start
my one-after-the-last word
uint32_t rod_detev_type() const
Returns the detector event type.
bool check_rob_noex(const uint16_t version=eformat::MAJOR_V40_VERSION) const
Says if the ROB fragment is valid.
uint32_t rod_status_position() const
Returns the status block position.
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.
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.
uint32_t rod_bc_id() const
Returns the bunch crossing identifier.
const uint32_t * rod_start() const
Sets the given pointer to the ROD fragment start.
uint32_t rod_fragment_size_word() const
Returns the total fragment size.
uint32_t rod_source_id() const
Returns the source identifier of the ROD fragment.
ROBFragment()
Builds an empty, otherwise useless ROBFragment.
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.
virtual uint32_t children(const uint32_t **p, size_t max) const
Returns all the children of this fragment.
uint32_t rod_ndata() const
Returns the number of data words available.
void rod_start(const uint32_t *&it) const
uint32_t rod_header_size_word() const
Returns the size, in words, of the current header.
uint32_t rod_lvl1_trigger_type() const
Returns the lvl1 trigger type.
const uint32_t * child(size_t n) const
Returns the nth child fragment.
bool check_rod(const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
Says if the underlying ROD fragment is valid.
uint32_t rod_marker() const
Returns the fragment type.
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.
ROBFragment(const uint32_t *it)
To build a fragment given the containing buffer.
ROBFragment & assign(const uint32_t *it)
Manual re-assignment.
uint32_t rod_run_no() const
Returns the current run number.
uint32_t rob_source_id() const
Gets the source_id of the ROB fragment itself.
virtual ~ROBFragment()
Destructor virtualisation.
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.
const uint32_t * rod_data() const
Returns a pointer to the first data word.
const uint32_t * rod_status() const
Returns the status words, as an iterator to the status words available.
ROBFragment & operator=(const ROBFragment &other)
Assignment.
uint32_t rod_nstatus() const
Returns the number of status words available.
void rod_status(const uint32_t *&it) const
bool check_rod_noex(const uint16_t rod_version=eformat::MAJOR_V31_VERSION) const
Says if the underlying ROD fragment is valid.
uint32_t rod_trailer_size_word() const
Returns the size, in words, of the trailer.
void rod_data(const uint32_t *&it) const
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.
bool check_rob_impl(const uint16_t version=eformat::MAJOR_V40_VERSION, const bool exc=true) const
Says if the ROB fragment is valid.
bool check_rob(const uint16_t version=eformat::MAJOR_V40_VERSION) const
Says if the ROB fragment is valid.
uint32_t rod_lvl1_id() const
Returns the lvl1 identifier.
virtual uint32_t nchildren() const
Returns the number of children available.
virtual void child(const uint32_t *&p, size_t n) const