artdaq::ContainerFragment Class Reference

The artdaq::ContainerFragment class represents a Fragment which contains other Fragments. More...

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

Inheritance diagram for artdaq::ContainerFragment:
artdaq::ContainerFragmentLoader

List of all members.

Classes

struct  Metadata
 Contains the information necessary for retrieving Fragment objects from the ContainerFragment. More...

Public Member Functions

 static_assert (sizeof(Metadata)==Metadata::size_words *sizeof(Metadata::data_t),"ContainerFragment::Metadata size changed")
 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.
Fragment const * dataBegin () const
 Gets the start of the data.
Fragment const * dataEnd () const
 Gets the last Fragment in the ContainerFragment.
Fragment const * 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.
Fragment const * 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 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.

Detailed Description

The artdaq::ContainerFragment class represents a Fragment which contains other Fragments.

Definition at line 30 of file ContainerFragment.hh.


Constructor & Destructor Documentation

artdaq::ContainerFragment::ContainerFragment ( Fragment const &  f  )  [inline, explicit]
Parameters:
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 61 of file ContainerFragment.hh.


Member Function Documentation

Fragment const* artdaq::ContainerFragment::at ( size_t  index  )  const [inline]

Gets a specific Fragment from the ContainerFragment.

Parameters:
index The Fragment index to return
Returns:
Pointer to the specified Fragment in the ContainerFragment
Exceptions:
cet::exception if the index is out-of-range

Definition at line 109 of file ContainerFragment.hh.

Metadata::count_t artdaq::ContainerFragment::block_count (  )  const [inline]

Gets the number of fragments stored in the ContainerFragment.

Returns:
The number of Fragment objects stored in the ContainerFragment

Definition at line 73 of file ContainerFragment.hh.

Fragment const* artdaq::ContainerFragment::dataBegin (  )  const [inline]

Gets the start of the data.

Returns:
Pointer to the first Fragment in the ContainerFragment

Definition at line 89 of file ContainerFragment.hh.

Fragment const* artdaq::ContainerFragment::dataEnd (  )  const [inline]

Gets the last Fragment in the ContainerFragment.

Returns:
Pointer to the last Fragment in the ContainerFragment

Definition at line 98 of file ContainerFragment.hh.

Fragment::type_t artdaq::ContainerFragment::fragment_type (  )  const [inline]

Get the Fragment::type_t of stored Fragment objects.

Returns:
The Fragment::type_t of stored Fragment objects

Definition at line 78 of file ContainerFragment.hh.

size_t artdaq::ContainerFragment::fragmentIndex ( size_t  index  )  const [inline]

Get the offset of a Fragment within the ContainerFragment.

Parameters:
index The Fragment index
Returns:
The offset of the requested Fragment within the ContainerFragment
Exceptions:
cet::exception if the index is out-of-range

Definition at line 146 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.

Parameters:
index The Fragment index
Returns:
The size of the Fragment at the specified location in the ContainerFragment
Exceptions:
cet::exception if the index is out-of-range

Definition at line 121 of file ContainerFragment.hh.

size_t artdaq::ContainerFragment::lastFragmentIndex (  )  const [inline]

Returns the offset of the last Fragment in the ContainerFragment.

Returns:
The offset of the last Fragment in the ContainerFragment

Definition at line 157 of file ContainerFragment.hh.

Metadata const* artdaq::ContainerFragment::metadata (  )  const [inline]

const getter function for the Metadata

Returns:
const pointer to the Metadata

Definition at line 67 of file ContainerFragment.hh.

bool artdaq::ContainerFragment::missing_data (  )  const [inline]

Gets the flag if the ContainerFragment knows that it is missing data.

Returns:
The flag if the ContainerFragment knows that it is missing data

Definition at line 83 of file ContainerFragment.hh.

Fragment const* artdaq::ContainerFragment::operator[] ( size_t  index  )  const [inline]

Alias to ContainerFragment::at().

Parameters:
index The Fragment index to return
Returns:
Pointer to the specified Fragment in the ContainerFragment
Exceptions:
cet::exception if the index is out-of-range

Definition at line 135 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.

Returns:
The ratio between the fundamental data storage type and the representation within the Fragment

Definition at line 168 of file ContainerFragment.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on 7 Aug 2017 for artdaq_core by  doxygen 1.6.1