artdaq_core
v3_05_00
|
A Read-Write version of the ContainerFragment, used for filling ContainerFragment objects with other Fragment objects. More...
#include <artdaq-core/Data/ContainerFragmentLoader.hh>
Public Member Functions | |
ContainerFragmentLoader (Fragment &f, Fragment::type_t expectedFragmentType) | |
Constructs the ContainerFragmentLoader. More... | |
Metadata * | metadata () |
Get the ContainerFragment metadata (includes information about the location of Fragment objects within the ContainerFragment) More... | |
void | set_fragment_type (Fragment::type_t type) |
Sets the type of Fragment which this ContainerFragment should contain. More... | |
void | set_missing_data (bool isDataMissing) |
Sets the missing_data flag. More... | |
void | addFragment (artdaq::Fragment &frag) |
Add a Fragment to the ContainerFragment by reference. More... | |
void | addFragment (artdaq::FragmentPtr &frag) |
Add a Fragment to the ContainerFragment by smart pointer. More... | |
void | addFragments (artdaq::FragmentPtrs &frags) |
Add a collection of Fragment objects to the ContainerFragment. More... | |
![]() | |
Metadata const * | UpgradeMetadata (MetadataV0 const *in) const |
Upgrade the Metadata of a fixed-size ContainerFragment to the new standard. More... | |
ContainerFragment (Fragment const &f) | |
Metadata const * | metadata () const |
const getter function for the Metadata More... | |
Metadata::count_t | block_count () const |
Gets the number of fragments stored in the ContainerFragment. More... | |
Fragment::type_t | fragment_type () const |
Get the Fragment::type_t of stored Fragment objects. More... | |
bool | missing_data () const |
Gets the flag if the ContainerFragment knows that it is missing data. More... | |
void const * | dataBegin () const |
Gets the start of the data. More... | |
void const * | dataEnd () const |
Gets the last Fragment in the ContainerFragment. More... | |
FragmentPtr | at (size_t index) const |
Gets a specific Fragment from the ContainerFragment. More... | |
size_t | fragSize (size_t index) const |
Gets the size of the Fragment at the specified location in the ContainerFragment, in bytes. More... | |
FragmentPtr | operator[] (size_t index) const |
Alias to ContainerFragment::at() More... | |
size_t | fragmentIndex (size_t index) const |
Get the offset of a Fragment within the ContainerFragment. More... | |
size_t | lastFragmentIndex () const |
Returns the offset of the last Fragment in the ContainerFragment. More... | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
const size_t * | create_index_ () const |
Create an index for the currently-contained Fragments. More... | |
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. More... | |
![]() | |
static constexpr size_t | words_per_frag_word_ () |
Gets the ratio between the fundamental data storage type and the representation within the Fragment. More... | |
A Read-Write version of the ContainerFragment, used for filling ContainerFragment objects with other Fragment objects.
Definition at line 30 of file ContainerFragmentLoader.hh.
|
inlineexplicit |
Constructs the ContainerFragmentLoader.
f | A Fragment object containing a Fragment header. |
expectedFragmentType | The type of fragment which will be put into this ContainerFragment |
cet::exception | if the Fragment input has inconsistent Header information |
Definition at line 107 of file ContainerFragmentLoader.hh.
|
inline |
Add a Fragment to the ContainerFragment by reference.
frag | A Fragment object to be added to the ContainerFragment |
cet::exception | If the Fragment to be added has a different type than expected |
Definition at line 151 of file ContainerFragmentLoader.hh.
|
inline |
Add a Fragment to the ContainerFragment by smart pointer.
frag | A FragmentPtr to a Fragment to be added to the ContainerFragment |
Definition at line 181 of file ContainerFragmentLoader.hh.
|
inline |
Add a collection of Fragment objects to the ContainerFragment.
frags | An artdaq::FragmentPtrs object containing Fragments to be added to the ContainerFragment |
Definition at line 186 of file ContainerFragmentLoader.hh.
|
inline |
Get the ContainerFragment metadata (includes information about the location of Fragment objects within the ContainerFragment)
Definition at line 48 of file ContainerFragmentLoader.hh.
|
inline |
Sets the type of Fragment which this ContainerFragment should contain.
type | The Fragment::type_t identifying the type of Fragment objects stored in this ContainerFragment |
Definition at line 58 of file ContainerFragmentLoader.hh.
|
inline |
Sets the missing_data flag.
isDataMissing | The value of the missing_data flag |
The ContainerFragment::Metadata::missing_data flag is used for FragmentGenerators to indicate that the fragment is incomplete, but the generator does not have the correct data to fill it. This happens for Window-mode FragmentGenerators when the window requested is before the start of the FragmentGenerator's buffers, for example.
Definition at line 71 of file ContainerFragmentLoader.hh.