artdaq_core  v1_07_08
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
artdaq::ContainerFragmentLoader Class Reference

A Read-Write version of the ContainerFragment, used for filling ContainerFragment objects with other Fragment objects. More...

#include <artdaq-core/Data/ContainerFragmentLoader.hh>

+ Inheritance diagram for artdaq::ContainerFragmentLoader:

Public Member Functions

 ContainerFragmentLoader (Fragment &f)
 Constructs the ContainerFragmentLoader. More...
 
Metadatametadata ()
 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...
 
- Public Member Functions inherited from artdaq::ContainerFragment
 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...
 
Fragment const * dataBegin () const
 Gets the start of the data. More...
 
Fragment const * dataEnd () const
 Gets the last Fragment in the ContainerFragment. More...
 
Fragment const * 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. More...
 
Fragment const * 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 Protected Member Functions inherited from artdaq::ContainerFragment
static constexpr size_t words_per_frag_word_ ()
 Gets the ratio between the fundamental data storage type and the representation within the Fragment. More...
 

Detailed Description

A Read-Write version of the ContainerFragment, used for filling ContainerFragment objects with other Fragment objects.

Definition at line 28 of file ContainerFragmentLoader.hh.

Constructor & Destructor Documentation

artdaq::ContainerFragmentLoader::ContainerFragmentLoader ( artdaq::Fragment f)
inlineexplicit

Constructs the ContainerFragmentLoader.

Parameters
fA Fragment object containing a Fragment header.
Exceptions
cet::exceptionif the Fragment input has inconsistent Header information

Definition at line 104 of file ContainerFragmentLoader.hh.

Member Function Documentation

void artdaq::ContainerFragmentLoader::addFragment ( artdaq::Fragment frag)
inline

Add a Fragment to the ContainerFragment by reference.

Parameters
fragA Fragment object to be added to the ContainerFragment
Exceptions
cet::exceptionIf the Fragment to be added has a different type than expected

Definition at line 146 of file ContainerFragmentLoader.hh.

void artdaq::ContainerFragmentLoader::addFragment ( artdaq::FragmentPtr frag)
inline

Add a Fragment to the ContainerFragment by smart pointer.

Parameters
fragA FragmentPtr to a Fragment to be added to the ContainerFragment

Definition at line 166 of file ContainerFragmentLoader.hh.

void artdaq::ContainerFragmentLoader::addFragments ( artdaq::FragmentPtrs frags)
inline

Add a collection of Fragment objects to the ContainerFragment.

Parameters
fragsAn artdaq::FragmentPtrs object containing Fragments to be added to the ContainerFragment

Definition at line 171 of file ContainerFragmentLoader.hh.

Metadata* artdaq::ContainerFragmentLoader::metadata ( )
inline

Get the ContainerFragment metadata (includes information about the location of Fragment objects within the ContainerFragment)

Returns
The ContainerFragment metadata

Definition at line 45 of file ContainerFragmentLoader.hh.

void artdaq::ContainerFragmentLoader::set_fragment_type ( Fragment::type_t  type)
inline

Sets the type of Fragment which this ContainerFragment should contain.

Parameters
typeThe Fragment::type_t identifying the type of Fragment objects stored in this ContainerFragment

Definition at line 55 of file ContainerFragmentLoader.hh.

void artdaq::ContainerFragmentLoader::set_missing_data ( bool  isDataMissing)
inline

Sets the missing_data flag.

Parameters
isDataMissingThe 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 68 of file ContainerFragmentLoader.hh.


The documentation for this class was generated from the following file: