artdaq_demo_hdf5
v1_01_04
|
A FragmentDataset implementation which produces files where each event is a Group, and each Fragment_id_t within the group is either a dataset or a group if it is a ContainerFragment. More...
Public Member Functions | |
HighFiveGroupedDataset (fhicl::ParameterSet const &ps) | |
HighFiveGroupedDataset Constructor. More... | |
~HighFiveGroupedDataset () noexceptoverride | |
HighFiveGroupedDataset Destructor. | |
void | insertOne (artdaq::Fragment const &frag) override |
Insert a Fragment into the Dataset (write it to the HDF5 file) More... | |
void | insertMany (artdaq::Fragments const &frags) override |
Insert several Fragments into the Dataset (write them to the HDF5 file) More... | |
void | insertHeader (artdaq::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 &seqID) override |
Read a RawEventHeader from the Dataset (HDF5 file) More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
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. | |
A FragmentDataset implementation which produces files where each event is a Group, and each Fragment_id_t within the group is either a dataset or a group if it is a ContainerFragment.
This implementation uses groups for each event, and datasets for each Fragment's metadata and payload. The advantage of this arrangement is that since each Fragment is its own dataset, each dataset can be sized to exactly hold that Fragment's data.
Definition at line 28 of file highFiveGroupedDataset_dataset.cc.
artdaq::hdf5::HighFiveGroupedDataset::HighFiveGroupedDataset | ( | fhicl::ParameterSet const & | ps | ) |
HighFiveGroupedDataset Constructor.
ps | ParameterSet used to configure HighFiveGroupedDataset |
HighFiveGroupedDataset accepts the following Parameters: "fileName" (REQUIRED): File name to use "mode" (Default: "write"): Mode string to use for this FragmentDataset
Definition at line 94 of file highFiveGroupedDataset_dataset.cc.
|
overridevirtual |
Read a RawEventHeader from the Dataset (HDF5 file)
seqID | Sequence ID of the RawEventHeader (should be equivalent to event number) |
Implements artdaq::hdf5::FragmentDataset.
Definition at line 327 of file highFiveGroupedDataset_dataset.cc.
|
override |
Insert a RawEventHeader into the Dataset (write it to the HDF5 file)
hdr | RawEventHeader to insert |
This function writes the header information into attributes for the HDF5 Group identified by the sequence ID of the RawDataHeader.
Definition at line 203 of file highFiveGroupedDataset_dataset.cc.
|
override |
Insert several Fragments into the Dataset (write them to the HDF5 file)
frags | Fragments to insert |
Definition at line 196 of file highFiveGroupedDataset_dataset.cc.
|
override |
Insert a Fragment into the Dataset (write it to the HDF5 file)
frag | Fragment to insert |
Each Fragment will be written as an HDF5 Dataset, unless it is a Container type, in which case it will be written as an HDF5 Group, with each contained Fragment as a Dataset within that Group. Fragments are written as metadata and payload, with the Fragment header fields represented as Dataset attributes.
Definition at line 116 of file highFiveGroupedDataset_dataset.cc.
|
overridevirtual |
Read the next event from the Dataset (HDF5 file)
Implements artdaq::hdf5::FragmentDataset.
Definition at line 220 of file highFiveGroupedDataset_dataset.cc.