![]() |
ATLAS Offline Software
|
Defines a helper class to aid the creation of FullEvent fragments. More...
#include <v40_write_FullEventFragment.h>
Public Member Functions | |
FullEventFragment (uint32_t source_id, uint32_t bc_time_secs, uint32_t bc_time_nsec, uint32_t global_id, uint32_t run_type, uint32_t run_no, uint16_t lumi_block, uint32_t lvl1_id, uint16_t bc_id, uint8_t lvl1_type) | |
Builds a new FullEvent fragment from scratch, using the current time as the time label. More... | |
FullEventFragment (const uint32_t *fe) | |
Builds a new FullEvent fragment from an existing FullEvent fragment in contiguous memory. More... | |
FullEventFragment () | |
Builds a new empty FullEventFragment, otherwise invalid. More... | |
FullEventFragment (const FullEventFragment &other)=delete | |
FullEventFragment & | operator= (const FullEventFragment &other)=delete |
virtual | ~FullEventFragment () |
Base destructor. More... | |
void | copy_header (const uint32_t *other) |
Copies the header (meta data information) from another existing FullEvent Fragment. More... | |
void | copy_header (const FullEventFragment &other) |
void | status (uint32_t n, const uint32_t *status) |
Changes the number of status words and the status words themselves from the fragment. More... | |
uint32_t | nstatus (void) const |
Returns the number of status wors in this fragment. More... | |
const uint32_t * | status (void) const |
Returns a pointer to the first status word to be used by this fragment. More... | |
void | minor_version (uint16_t v) |
Changes the minor version number of the fragment. More... | |
uint16_t | minor_version (void) const |
Returns the minor version number of the fragment. More... | |
void | source_id (uint32_t s) |
Changes the source identifier for this fragment. More... | |
uint32_t | source_id (void) const |
Returns the source identifier of this fragment. More... | |
void | checksum_type (uint32_t s) |
Changes the check-sum type for this fragment. More... | |
uint32_t | checksum_type (void) const |
Returns the check sum type of this fragment. More... | |
void | bc_time_seconds (uint32_t s) |
Changes the bunch crossing time (seconds) this fragment was produced at. More... | |
void | bc_time_nanoseconds (uint32_t s) |
Changes the bunch crossing time (the nanoseconds part) this fragment was produced at. More... | |
uint32_t | bc_time_seconds (void) const |
Returns the time since the (unix) origin, in seconds, for this fragment. More... | |
uint32_t | bc_time_nanoseconds (void) const |
Returns the additional amount of nanoseconds, for this fragment's bunch crossing time. More... | |
void | global_id (uint32_t s) |
Changes the global identifier for this event. More... | |
uint32_t | global_id (void) const |
Returns the global identifier for this event. More... | |
void | run_type (uint32_t s) |
Changes the run type. More... | |
uint32_t | run_type (void) const |
Returns the run type for this fragment. More... | |
void | run_no (uint32_t s) |
Changes the run number. More... | |
uint32_t | run_no (void) const |
Returns the run number for this fragment. More... | |
void | lumi_block (uint16_t s) |
Changes the luminosity block number. More... | |
uint16_t | lumi_block (void) const |
Returns the luminosity block number for this fragment. More... | |
void | lvl1_id (uint32_t s) |
Changes the lvl1 identifier in this fragment. More... | |
uint32_t | lvl1_id (void) const |
Returns the lvl1 identifier for this fragment. More... | |
void | bc_id (uint16_t s) |
Changes the bunch crossing identifier in this fragment. More... | |
uint16_t | bc_id (void) const |
Returns the bunch crossing identifier for this fragment. More... | |
void | lvl1_trigger_type (uint8_t s) |
Changes the lvl1 trigger type in this fragment. More... | |
uint8_t | lvl1_trigger_type (void) const |
Returns the lvl1 trigger type for this fragment. More... | |
void | lvl1_trigger_info (uint32_t n, const uint32_t *data) |
Changes the LVL1 trigger info words from the fragment. More... | |
uint32_t | nlvl1_trigger_info (void) const |
Returns the number of status wors in this fragment. More... | |
const uint32_t * | lvl1_trigger_info (void) const |
Returns a pointer to the first LVL1 trigger info to be used by this fragment. More... | |
void | lvl2_trigger_info (uint32_t n, const uint32_t *data) |
Changes the LVL2 trigger info words from the fragment. More... | |
uint32_t | nlvl2_trigger_info (void) const |
Returns the number of status wors in this fragment. More... | |
const uint32_t * | lvl2_trigger_info (void) const |
Returns a pointer to the first LVL2 trigger info to be used by this fragment. More... | |
void | event_filter_info (uint32_t n, const uint32_t *data) |
Changes the EF trigger info words from the fragment. More... | |
uint32_t | nevent_filter_info (void) const |
Returns the number of status wors in this fragment. More... | |
const uint32_t * | event_filter_info (void) const |
Returns a pointer to the first EF trigger info to be used by this fragment. More... | |
uint32_t | nstream_tag (void) const |
Returns the number of stream tag words in this fragment. More... | |
void | stream_tag (uint32_t n, const uint32_t *data) |
Changes the stream tag words from the fragment. More... | |
const uint32_t * | stream_tag (void) const |
Returns a pointer to the first stream tag word to be used by this fragment. More... | |
uint32_t | meta_size_word (void) const |
Returns the size of this fragments header. More... | |
uint32_t | size_word (void) const |
Returns the total size for this fragment, in words. More... | |
void | append (v40_write::ROBFragment *rob) |
Appends a new ROB fragment to this FullEvent fragment. More... | |
void | append_unchecked (const uint32_t *rob) |
Appends an unchecked (read-only) ROB fragment to the current FullEvent. More... | |
uint32_t | nunchecked_fragments (void) const |
Returns the number of unchecked ROBs there are. More... | |
const uint32_t * | unchecked_fragment (uint32_t n) const |
Returns a particular unchecked ROB fragment. More... | |
const v40_write::ROBFragment * | first_child (void) const |
This returns the first child of this fragment. More... | |
void | size_change (uint32_t o, uint32_t n) |
This method is used by children of this fragment to notify fragment size changes. More... | |
uint32_t | page_count (void) const |
Returns the total number of (raw memory) pages this fragment is composed of. More... | |
const eformat::write::node_t * | bind (void) |
Returns the first node of a list of nodes that represent the fragment you have constructed. More... | |
Private Member Functions | |
void | initialize (void) |
Initializes the internal fields of this ROB fragment with the standard values. More... | |
Private Attributes | |
uint32_t | m_header [20] |
The FullEvent Header. More... | |
eformat::write::node_t | m_node [12] |
Node representation. More... | |
v40_write::ROBFragment * | m_child |
my children More... | |
v40_write::ROBFragment * | m_last |
my last child More... | |
uint32_t | m_checksum |
My payload's checksum, if asked. More... | |
uint32_t | m_n_unchecked |
The number of unchecked nodes attached. More... | |
eformat::write::node_t | m_unchecked [MAX_UNCHECKED_FRAGMENTS] |
Unchecked nodes. More... | |
Defines a helper class to aid the creation of FullEvent fragments.
Definition at line 38 of file v40_write_FullEventFragment.h.
offline_eformat::v40_write::FullEventFragment::FullEventFragment | ( | uint32_t | source_id, |
uint32_t | bc_time_secs, | ||
uint32_t | bc_time_nsec, | ||
uint32_t | global_id, | ||
uint32_t | run_type, | ||
uint32_t | run_no, | ||
uint16_t | lumi_block, | ||
uint32_t | lvl1_id, | ||
uint16_t | bc_id, | ||
uint8_t | lvl1_type | ||
) |
Builds a new FullEvent fragment from scratch, using the current time as the time label.
source_id | The source identifier to be using for this FullEvent |
bc_time_secs | The bunch crossing time in seconds, since the (unix) orgin |
bc_time_nsec | The additional amount of nanoseconds since the |
global_id | The global identifier for this fragment |
run_type | The run type for this fragment |
run_no | The run number for this fragment |
lumi_block | The luminosity block number (16-bits) |
lvl1_id | The LVL1 trigger identifier for this fragment |
bc_id | The bunch crossing identifier (12-bits) |
lvl1_type | The LVL1 trigger type for this fragment (8-bits) |
Definition at line 76 of file v40_write_FullEventFragment.cxx.
offline_eformat::v40_write::FullEventFragment::FullEventFragment | ( | const uint32_t * | fe | ) |
Builds a new FullEvent fragment from an existing FullEvent fragment in contiguous memory.
fe | The existing FullEvent fragment |
Definition at line 95 of file v40_write_FullEventFragment.cxx.
offline_eformat::v40_write::FullEventFragment::FullEventFragment | ( | ) |
Builds a new empty FullEventFragment, otherwise invalid.
This is useful for array builds and standard containers.
Definition at line 109 of file v40_write_FullEventFragment.cxx.
|
delete |
|
virtual |
void offline_eformat::v40_write::FullEventFragment::append | ( | v40_write::ROBFragment * | rob | ) |
Appends a new ROB fragment to this FullEvent fragment.
rob | The ROB fragment to be appended to myself |
Definition at line 240 of file v40_write_FullEventFragment.cxx.
void offline_eformat::v40_write::FullEventFragment::append_unchecked | ( | const uint32_t * | rob | ) |
Appends an unchecked (read-only) ROB fragment to the current FullEvent.
The fragment will be appended after the writable ROB fragments inserted with append().
Unchecked fragments are appended to the end of the fragment stream, in the order they are received. This is done so we make sure that damaged fragments would only happen in the end of the stream and not on its begin - which could cause good fragments to be skipped.
Despite being unchecked the ROB fragment still has to fullfill two constraints:
rob_fragment | A pointer to the unchecked ROB fragment will be inserted as part of the current fragment. This ROB fragment must still fullfill the two requirements above. |
Definition at line 253 of file v40_write_FullEventFragment.cxx.
|
inline |
Changes the bunch crossing identifier in this fragment.
s | The new value to set |
Definition at line 274 of file v40_write_FullEventFragment.h.
|
inline |
Returns the bunch crossing identifier for this fragment.
Definition at line 280 of file v40_write_FullEventFragment.h.
|
inline |
Changes the bunch crossing time (the nanoseconds part) this fragment was produced at.
s | The new value to set |
Definition at line 182 of file v40_write_FullEventFragment.h.
|
inline |
Returns the additional amount of nanoseconds, for this fragment's bunch crossing time.
Definition at line 196 of file v40_write_FullEventFragment.h.
|
inline |
Changes the bunch crossing time (seconds) this fragment was produced at.
s | The new value to set |
Definition at line 173 of file v40_write_FullEventFragment.h.
|
inline |
Returns the time since the (unix) origin, in seconds, for this fragment.
Definition at line 189 of file v40_write_FullEventFragment.h.
const eformat::write::node_t * offline_eformat::v40_write::FullEventFragment::bind | ( | void | ) |
Returns the first node of a list of nodes that represent the fragment you have constructed.
To make use of it, just browse the list as defined in node.h
Definition at line 273 of file v40_write_FullEventFragment.cxx.
void offline_eformat::v40_write::FullEventFragment::checksum_type | ( | uint32_t | s | ) |
Changes the check-sum type for this fragment.
This will actually not calculate the checksum for this fragment. You will have to call bind() in order to do that. If you change anything within the fragment after calling bind(), a re-bind() is required.
s | The new value to set |
Definition at line 312 of file v40_write_FullEventFragment.cxx.
|
inline |
Returns the check sum type of this fragment.
Definition at line 165 of file v40_write_FullEventFragment.h.
void offline_eformat::v40_write::FullEventFragment::copy_header | ( | const FullEventFragment & | other | ) |
Definition at line 148 of file v40_write_FullEventFragment.cxx.
void offline_eformat::v40_write::FullEventFragment::copy_header | ( | const uint32_t * | other | ) |
Copies the header (meta data information) from another existing FullEvent Fragment.
Please note that this will not copy any specificy payload related information belonging to the other fragment.
Also note that the variable length data (status, info words, stream tags) is copied in a shallow way, by pointing to the existing blocks of the copied fragment. This way, you either must reset or guarantee this data will be available during the lifetime of this fragment.
other | The other FullEventFragment from which I should copy the metadata from |
Definition at line 118 of file v40_write_FullEventFragment.cxx.
void offline_eformat::v40_write::FullEventFragment::event_filter_info | ( | uint32_t | n, |
const uint32_t * | data | ||
) |
Changes the EF trigger info words from the fragment.
n | How many EF info words the underlying FullEventFragment fragment supposed to have. |
data | A pointer to n pre-allocated words |
Definition at line 212 of file v40_write_FullEventFragment.cxx.
|
inline |
Returns a pointer to the first EF trigger info to be used by this fragment.
Definition at line 360 of file v40_write_FullEventFragment.h.
|
inline |
This returns the first child of this fragment.
The system operates as a concatenated list of fragments. From this child you can get to the next.
Definition at line 458 of file v40_write_FullEventFragment.h.
|
inline |
Changes the global identifier for this event.
s | The new value to set |
Definition at line 204 of file v40_write_FullEventFragment.h.
|
inline |
Returns the global identifier for this event.
Definition at line 210 of file v40_write_FullEventFragment.h.
|
private |
Initializes the internal fields of this ROB fragment with the standard values.
Definition at line 25 of file v40_write_FullEventFragment.cxx.
|
inline |
Changes the luminosity block number.
s | The new value to set |
Definition at line 246 of file v40_write_FullEventFragment.h.
|
inline |
Returns the luminosity block number for this fragment.
Definition at line 252 of file v40_write_FullEventFragment.h.
|
inline |
Changes the lvl1 identifier in this fragment.
s | The new value to set |
Definition at line 260 of file v40_write_FullEventFragment.h.
|
inline |
Returns the lvl1 identifier for this fragment.
Definition at line 266 of file v40_write_FullEventFragment.h.
void offline_eformat::v40_write::FullEventFragment::lvl1_trigger_info | ( | uint32_t | n, |
const uint32_t * | data | ||
) |
Changes the LVL1 trigger info words from the fragment.
n | How many LVL1 info words the underlying FullEventFragment fragment supposed to have. |
data | A pointer to n pre-allocated words |
Definition at line 184 of file v40_write_FullEventFragment.cxx.
|
inline |
Returns a pointer to the first LVL1 trigger info to be used by this fragment.
Definition at line 316 of file v40_write_FullEventFragment.h.
|
inline |
Changes the lvl1 trigger type in this fragment.
s | The new value to set |
Definition at line 288 of file v40_write_FullEventFragment.h.
|
inline |
Returns the lvl1 trigger type for this fragment.
Definition at line 294 of file v40_write_FullEventFragment.h.
void offline_eformat::v40_write::FullEventFragment::lvl2_trigger_info | ( | uint32_t | n, |
const uint32_t * | data | ||
) |
Changes the LVL2 trigger info words from the fragment.
n | How many LVL2 info words the underlying FullEventFragment fragment supposed to have. |
data | A pointer to n pre-allocated words |
Definition at line 198 of file v40_write_FullEventFragment.cxx.
|
inline |
Returns a pointer to the first LVL2 trigger info to be used by this fragment.
Definition at line 338 of file v40_write_FullEventFragment.h.
|
inline |
Returns the size of this fragments header.
Definition at line 392 of file v40_write_FullEventFragment.h.
|
inline |
|
inline |
Returns the minor version number of the fragment.
Definition at line 135 of file v40_write_FullEventFragment.h.
|
inline |
Returns the number of status wors in this fragment.
Definition at line 353 of file v40_write_FullEventFragment.h.
|
inline |
Returns the number of status wors in this fragment.
Definition at line 309 of file v40_write_FullEventFragment.h.
|
inline |
Returns the number of status wors in this fragment.
Definition at line 331 of file v40_write_FullEventFragment.h.
|
inline |
Returns the number of status wors in this fragment.
Definition at line 115 of file v40_write_FullEventFragment.h.
|
inline |
Returns the number of stream tag words in this fragment.
At this level of the API, a stream tag is defined to be a 32-bit null padded (standard) C string.
Definition at line 368 of file v40_write_FullEventFragment.h.
|
inline |
Returns the number of unchecked ROBs there are.
Definition at line 441 of file v40_write_FullEventFragment.h.
|
delete |
uint32_t offline_eformat::v40_write::FullEventFragment::page_count | ( | void | ) | const |
Returns the total number of (raw memory) pages this fragment is composed of.
Definition at line 264 of file v40_write_FullEventFragment.cxx.
|
inline |
Changes the run number.
s | The new value to set |
Definition at line 232 of file v40_write_FullEventFragment.h.
|
inline |
Returns the run number for this fragment.
Definition at line 238 of file v40_write_FullEventFragment.h.
|
inline |
Changes the run type.
s | The new value to set |
Definition at line 218 of file v40_write_FullEventFragment.h.
|
inline |
Returns the run type for this fragment.
Definition at line 224 of file v40_write_FullEventFragment.h.
|
inline |
This method is used by children of this fragment to notify fragment size changes.
o | The old size, in 32-bit words |
n | The new size, in 32-bit words |
Definition at line 468 of file v40_write_FullEventFragment.h.
|
inline |
Returns the total size for this fragment, in words.
Definition at line 398 of file v40_write_FullEventFragment.h.
|
inline |
Changes the source identifier for this fragment.
s | The new value to set |
Definition at line 143 of file v40_write_FullEventFragment.h.
|
inline |
Returns the source identifier of this fragment.
Definition at line 149 of file v40_write_FullEventFragment.h.
void offline_eformat::v40_write::FullEventFragment::status | ( | uint32_t | n, |
const uint32_t * | status | ||
) |
Changes the number of status words and the status words themselves from the fragment.
n | How many status words the underlying FullEventFragment fragment supposed to have. |
status | A pointer to n pre-allocated words |
Definition at line 170 of file v40_write_FullEventFragment.cxx.
|
inline |
Returns a pointer to the first status word to be used by this fragment.
Definition at line 120 of file v40_write_FullEventFragment.h.
void offline_eformat::v40_write::FullEventFragment::stream_tag | ( | uint32_t | n, |
const uint32_t * | data | ||
) |
Changes the stream tag words from the fragment.
At this level of the API, a stream tag is defined to be a 32-bit null padded (standard) C string.
n | How many stream tag words the underlying FullEventFragment fragment supposed to have. |
data | A pointer to n pre-allocated words |
Definition at line 226 of file v40_write_FullEventFragment.cxx.
|
inline |
Returns a pointer to the first stream tag word to be used by this fragment.
At this level of the API, a stream tag is defined to be a 32-bit null padded (standard) C string.
Definition at line 387 of file v40_write_FullEventFragment.h.
const uint32_t * offline_eformat::v40_write::FullEventFragment::unchecked_fragment | ( | uint32_t | n | ) | const |
Returns a particular unchecked ROB fragment.
Please not that this method will not perform bound-checking. You are supposed to make sure the existing range is not exceeded.
n | The index of the unchecked fragment you want to retrieve. |
Definition at line 326 of file v40_write_FullEventFragment.cxx.
|
private |
My payload's checksum, if asked.
Definition at line 503 of file v40_write_FullEventFragment.h.
|
private |
my children
Definition at line 501 of file v40_write_FullEventFragment.h.
|
private |
The FullEvent Header.
Definition at line 499 of file v40_write_FullEventFragment.h.
|
private |
my last child
Definition at line 502 of file v40_write_FullEventFragment.h.
|
private |
The number of unchecked nodes attached.
Definition at line 504 of file v40_write_FullEventFragment.h.
|
private |
Node representation.
Definition at line 500 of file v40_write_FullEventFragment.h.
|
private |
Unchecked nodes.
Definition at line 505 of file v40_write_FullEventFragment.h.