$treeview $search $mathjax $extrastylesheet
artdaq_core
v3_06_01
$projectbrief
|
$projectbrief
|
$searchbox |
The artdaq::ContainerFragment class represents a Fragment which contains other Fragments. More...
#include <artdaq-core/Data/ContainerFragment.hh>
Classes | |
struct | Metadata |
Contains the information necessary for retrieving Fragment objects from the ContainerFragment. More... | |
struct | MetadataV0 |
Contains the information necessary for retrieving Fragment objects from the ContainerFragment. More... | |
Public Member Functions | |
static_assert (sizeof(MetadataV0)==MetadataV0::size_words *sizeof(MetadataV0::data_t),"ContainerFragment::MetadataV0 size changed") | |
static_assert (sizeof(Metadata)==Metadata::size_words *sizeof(Metadata::data_t),"ContainerFragment::Metadata size changed") | |
Metadata const * | UpgradeMetadata (MetadataV0 const *in) const |
Upgrade the Metadata of a fixed-size ContainerFragment to the new standard. | |
ContainerFragment (Fragment const &f) | |
Metadata const * | metadata () const |
const getter function for the Metadata | |
Metadata::count_t | block_count () const |
Gets the number of fragments stored in the ContainerFragment. | |
Fragment::type_t | fragment_type () const |
Get the Fragment::type_t of stored Fragment objects. | |
bool | missing_data () const |
Gets the flag if the ContainerFragment knows that it is missing data. | |
void const * | dataBegin () const |
Gets the start of the data. | |
void const * | dataEnd () const |
Gets the last Fragment in the ContainerFragment. | |
FragmentPtr | at (size_t index) const |
Gets a specific Fragment from the ContainerFragment. | |
size_t | fragSize (size_t index) const |
Gets the size of the Fragment at the specified location in the ContainerFragment, in bytes. | |
FragmentPtr | operator[] (size_t index) const |
Alias to ContainerFragment::at(). | |
size_t | fragmentIndex (size_t index) const |
Get the offset of a Fragment within the ContainerFragment. | |
size_t | lastFragmentIndex () const |
Returns the offset of the last Fragment in the ContainerFragment. | |
Static Public Attributes | |
static constexpr uint8_t | CURRENT_VERSION = 1 |
The current version of the ContainerFragmentHeader. | |
static constexpr size_t | CONTAINER_MAGIC = 0x00BADDEED5B1BEE5 |
Marker word used in index. | |
Protected Member Functions | |
const size_t * | create_index_ () const |
Create an index for the currently-contained Fragments. | |
void | reset_index_ptr_ () const |
Reset the index pointer, creating a new index if necessary. ContainerFragmentLoader uses this functionality to implant new indicies into the ContainerFragment, other code should simply use the get_index_ function. | |
const size_t * | get_index_ () const |
Get a pointer to the index. | |
Static Protected Member Functions | |
static constexpr size_t | words_per_frag_word_ () |
Gets the ratio between the fundamental data storage type and the representation within the Fragment. |
The artdaq::ContainerFragment class represents a Fragment which contains other Fragments.
Definition at line 20 of file ContainerFragment.hh.
artdaq::ContainerFragment::ContainerFragment | ( | Fragment const & | f | ) | [inline, explicit] |
f | The Fragment object to use for data storage |
The constructor simply sets its const private member "artdaq_Fragment_" to refer to the artdaq::Fragment object
Definition at line 103 of file ContainerFragment.hh.
FragmentPtr artdaq::ContainerFragment::at | ( | size_t | index | ) | const [inline] |
Gets a specific Fragment from the ContainerFragment.
index | The Fragment index to return |
cet::exception | if the index is out-of-range |
Definition at line 166 of file ContainerFragment.hh.
Metadata::count_t artdaq::ContainerFragment::block_count | ( | ) | const [inline] |
Gets the number of fragments stored in the ContainerFragment.
Definition at line 130 of file ContainerFragment.hh.
const size_t* artdaq::ContainerFragment::create_index_ | ( | ) | const [inline, protected] |
Create an index for the currently-contained Fragments.
Definition at line 259 of file ContainerFragment.hh.
void const* artdaq::ContainerFragment::dataBegin | ( | ) | const [inline] |
Gets the start of the data.
Definition at line 146 of file ContainerFragment.hh.
void const* artdaq::ContainerFragment::dataEnd | ( | ) | const [inline] |
Gets the last Fragment in the ContainerFragment.
Definition at line 155 of file ContainerFragment.hh.
Fragment::type_t artdaq::ContainerFragment::fragment_type | ( | ) | const [inline] |
Get the Fragment::type_t of stored Fragment objects.
Definition at line 135 of file ContainerFragment.hh.
size_t artdaq::ContainerFragment::fragmentIndex | ( | size_t | index | ) | const [inline] |
Get the offset of a Fragment within the ContainerFragment.
index | The Fragment index |
cet::exception | if the index is out-of-range |
Definition at line 223 of file ContainerFragment.hh.
size_t artdaq::ContainerFragment::fragSize | ( | size_t | index | ) | const [inline] |
Gets the size of the Fragment at the specified location in the ContainerFragment, in bytes.
index | The Fragment index |
cet::exception | if the index is out-of-range |
Definition at line 195 of file ContainerFragment.hh.
const size_t* artdaq::ContainerFragment::get_index_ | ( | ) | const [inline, protected] |
Get a pointer to the index.
Definition at line 302 of file ContainerFragment.hh.
size_t artdaq::ContainerFragment::lastFragmentIndex | ( | ) | const [inline] |
Returns the offset of the last Fragment in the ContainerFragment.
Definition at line 240 of file ContainerFragment.hh.
Metadata const* artdaq::ContainerFragment::metadata | ( | ) | const [inline] |
const getter function for the Metadata
Definition at line 114 of file ContainerFragment.hh.
bool artdaq::ContainerFragment::missing_data | ( | ) | const [inline] |
Gets the flag if the ContainerFragment knows that it is missing data.
Definition at line 140 of file ContainerFragment.hh.
FragmentPtr artdaq::ContainerFragment::operator[] | ( | size_t | index | ) | const [inline] |
Alias to ContainerFragment::at().
index | The Fragment index to return |
cet::exception | if the index is out-of-range |
Definition at line 212 of file ContainerFragment.hh.
Metadata const* artdaq::ContainerFragment::UpgradeMetadata | ( | MetadataV0 const * | in | ) | const [inline] |
Upgrade the Metadata of a fixed-size ContainerFragment to the new standard.
in | Metadata to upgrade |
Definition at line 82 of file ContainerFragment.hh.
static constexpr size_t artdaq::ContainerFragment::words_per_frag_word_ | ( | ) | [inline, static, protected] |
Gets the ratio between the fundamental data storage type and the representation within the Fragment.
Definition at line 250 of file ContainerFragment.hh.