artdaq_demo_hdf5
v1_01_02
|
Base class that defines methods for reading and writing to HDF5 files via various implementation plugins. More...
#include <artdaq-demo-hdf5/HDF5/FragmentDataset.hh>
Public Member Functions | |
FragmentDataset (fhicl::ParameterSet const &ps, const std::string &mode) | |
FragmentDataset Constructor. More... | |
virtual | ~FragmentDataset () noexcept=default |
FragmentDataset default virtual destructor. | |
virtual void | insertOne (Fragment const &f)=0 |
Insert a Fragment into the Dataset (write it to the HDF5 file) More... | |
virtual void | insertMany (Fragments const &fs) |
Insert several Fragments into the Dataset (write them to the HDF5 file) More... | |
virtual void | insertHeader (detail::RawEventHeader const &e)=0 |
Insert a RawEventHeader into the Dataset (write it to the HDF5 file) More... | |
virtual std::unordered_map < artdaq::Fragment::type_t, std::unique_ptr < artdaq::Fragments > > | readNextEvent ()=0 |
Read the next event from the Dataset (HDF5 file) More... | |
virtual std::unique_ptr < artdaq::detail::RawEventHeader > | getEventHeader (artdaq::Fragment::sequence_id_t const &seqID)=0 |
Read a RawEventHeader from the Dataset (HDF5 file) More... | |
Protected Attributes | |
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. | |
Base class that defines methods for reading and writing to HDF5 files via various implementation plugins.
This design was chosen so that multiple different HDF5 backends could be evaluated in parallel, as well as different file formats within each backend.
Definition at line 30 of file FragmentDataset.hh.
artdaq::hdf5::FragmentDataset::FragmentDataset | ( | fhicl::ParameterSet const & | ps, |
const std::string & | mode | ||
) |
FragmentDataset Constructor.
ps | ParameterSet containing configuration for this FragmentDataset |
mode | String which will be converted to a FragmentDatasetMode. Currently, if this parameter contains "rite", then FragmentDatasetMode::Write will be used, FragmentDatasetMode::Read otherwise. |
FragmentDataset takes no Parameters.
Definition at line 6 of file FragmentDataset.cc.
|
pure virtual |
Read a RawEventHeader from the Dataset (HDF5 file)
seqID | Sequence ID of the RawEventHeader (should be equivalent to event number) |
This function is pure virtual.
Implemented in artdaq::hdf5::FragmentNtuple, artdaq::hdf5::HighFiveGroupedDataset, artdaq::hdf5::HighFiveNtupleDataset, artdaq::hdf5::HighFiveGeoCmpltPDSPSample, artdaq::hdf5::HighFiveGeoSplitPDSPSample, and artdaq::hdf5::HighFiveGeoCmpltPDSPSample.
|
pure virtual |
Insert a RawEventHeader into the Dataset (write it to the HDF5 file)
e | RawEventHeader to insert |
This function is pure virtual.
Implemented in artdaq::hdf5::HighFiveNtupleDataset.
|
inlinevirtual |
Insert several Fragments into the Dataset (write them to the HDF5 file)
fs | Fragments to insert |
Definition at line 56 of file FragmentDataset.hh.
|
pure virtual |
Insert a Fragment into the Dataset (write it to the HDF5 file)
f | Fragment to insert |
This function is pure virtual.
Implemented in artdaq::hdf5::HighFiveNtupleDataset.
|
pure virtual |
Read the next event from the Dataset (HDF5 file)
This function is pure virtual.
Implemented in artdaq::hdf5::FragmentNtuple, artdaq::hdf5::HighFiveGroupedDataset, artdaq::hdf5::HighFiveNtupleDataset, artdaq::hdf5::HighFiveGeoCmpltPDSPSample, artdaq::hdf5::HighFiveGeoSplitPDSPSample, and artdaq::hdf5::HighFiveGeoCmpltPDSPSample.