artdaq_demo_hdf5  v1_01_05
artdaq::hdf5::HighFiveNtupleDataset Class Reference

An implementation of FragmentDataset using the HighFive backend to produce files identical to those produced by the hep_hpc backend (FragmentNtuple) More...

#include <artdaq-demo-hdf5/HDF5/highFive/highFiveNtupleDataset.hh>

Inheritance diagram for artdaq::hdf5::HighFiveNtupleDataset:
artdaq::hdf5::FragmentDataset

Public Member Functions

 HighFiveNtupleDataset (fhicl::ParameterSet const &ps)
 HighFiveNtupleDataset Constructor. More...
 
virtual ~HighFiveNtupleDataset () noexcept
 HighFiveNtupleDataset Destructor.
 
void insertOne (Fragment const &frag) override
 Insert a Fragment into the Dataset (write it to the HDF5 file) More...
 
void insertHeader (detail::RawEventHeader const &hdr) override
 Insert a RawEventHeader into the Dataset (write it to the HDF5 file) More...
 
std::unordered_map
< artdaq::Fragment::type_t,
std::unique_ptr
< artdaq::Fragments > > 
readNextEvent () override
 Read the next event from the Dataset (HDF5 file) More...
 
std::unique_ptr
< artdaq::detail::RawEventHeader > 
getEventHeader (artdaq::Fragment::sequence_id_t const &) override
 Read a RawEventHeader from the Dataset (HDF5 file) More...
 
- Public Member Functions inherited from artdaq::hdf5::FragmentDataset
 FragmentDataset (fhicl::ParameterSet const &ps, const std::string &mode)
 FragmentDataset Constructor. More...
 
virtual ~FragmentDataset () noexcept=default
 FragmentDataset default virtual destructor.
 
virtual void insertMany (Fragments const &fs)
 Insert several Fragments into the Dataset (write them to the HDF5 file) More...
 

Additional Inherited Members

- Protected Attributes inherited from artdaq::hdf5::FragmentDataset
FragmentDatasetMode mode_
 Mode of this FragmentDataset, either FragmentDatasetMode::Write or FragmentDatasetMode::Read.
 
std::shared_ptr
< artdaq::FragmentNameHelper > 
nameHelper_
 FragmentNameHelper used to translate between Fragment Type and string instance names.
 

Detailed Description

An implementation of FragmentDataset using the HighFive backend to produce files identical to those produced by the hep_hpc backend (FragmentNtuple)

Definition at line 20 of file highFiveNtupleDataset.hh.

Constructor & Destructor Documentation

artdaq::hdf5::HighFiveNtupleDataset::HighFiveNtupleDataset ( fhicl::ParameterSet const &  ps)

HighFiveNtupleDataset Constructor.

Parameters
psParameterSet used to configure HighFiveNtupleDataset

HighFiveNtupleDataset accepts the following Parameters: "mode" (Default: "write"): Mode string to use for this FragmentDataset "nWordsPerRow" (Default: 10240): Number of payload words to store in each row of the Dataset "payloadChunkSize" (Default: 128): Size of the payload Ntuple's chunks, in rows "chunkCacheSizeBytes" (Default: 10 chunks): Size of the chunk cache, in bytes "fileName" (REQUIRED): HDF5 file to read/write

Definition at line 9 of file highFiveNtupleDataset_dataset.cc.

Member Function Documentation

std::unique_ptr< artdaq::detail::RawEventHeader > artdaq::hdf5::HighFiveNtupleDataset::getEventHeader ( artdaq::Fragment::sequence_id_t const &  seqID)
overridevirtual

Read a RawEventHeader from the Dataset (HDF5 file)

Parameters
seqIDSequence ID of the RawEventHeader (should be equivalent to event number)
Returns
Pointer to a RawEventHeader if a match was found in the Dataset, nullptr otherwise

Implements artdaq::hdf5::FragmentDataset.

Definition at line 191 of file highFiveNtupleDataset_dataset.cc.

void artdaq::hdf5::HighFiveNtupleDataset::insertHeader ( detail::RawEventHeader const &  hdr)
overridevirtual

Insert a RawEventHeader into the Dataset (write it to the HDF5 file)

Parameters
hdrRawEventHeader to insert

This FragmentDataset plugin uses the "Ntuple" file format, where each RawEventHeader is represented by a row in the EventHeaders Ntuple Group.

Implements artdaq::hdf5::FragmentDataset.

Definition at line 114 of file highFiveNtupleDataset_dataset.cc.

void artdaq::hdf5::HighFiveNtupleDataset::insertOne ( Fragment const &  frag)
overridevirtual

Insert a Fragment into the Dataset (write it to the HDF5 file)

Parameters
fragFragment to insert

This FragmentDataset plugin uses the "Ntuple" file format, where each Fragment is represented by one or more rows in the Fragments Ntuple Group.

Implements artdaq::hdf5::FragmentDataset.

Definition at line 84 of file highFiveNtupleDataset_dataset.cc.

std::unordered_map< artdaq::Fragment::type_t, std::unique_ptr< artdaq::Fragments > > artdaq::hdf5::HighFiveNtupleDataset::readNextEvent ( )
overridevirtual

Read the next event from the Dataset (HDF5 file)

Returns
A Map of Fragment::type_t and pointers to Fragments, suitable for ArtdaqInput

Implements artdaq::hdf5::FragmentDataset.

Definition at line 127 of file highFiveNtupleDataset_dataset.cc.


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