artdaq_demo_hdf5
v1_00_00
|
An implementation of FragmentDataset for ToyFragment. Uses a FragmentNtuple dataset plugin for any Fragments which are not ToyFragments. More...
#include <artdaq-demo-hdf5/HDF5/hep-hpc/ToyFragmentNtuple.hh>
Public Member Functions | |
ToyFragmentNtuple (fhicl::ParameterSet const &ps) | |
ToyFragmentNtuple Constructor. More... | |
virtual | ~ToyFragmentNtuple () |
ToyFragmentNtuple Destructor. | |
void | insertOne (artdaq::Fragment const &f) override |
Insert a Fragment into the Fragment Ntuple Dataset (write it to the HDF5 file) More... | |
void | insertHeader (artdaq::detail::RawEventHeader const &evtHdr) override |
Insert a RawEventHeader into the Event Header Ntuple 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... | |
![]() | |
FragmentDataset (fhicl::ParameterSet const &ps, 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. | |
An implementation of FragmentDataset for ToyFragment. Uses a FragmentNtuple dataset plugin for any Fragments which are not ToyFragments.
Definition at line 15 of file ToyFragmentNtuple.hh.
artdaq::hdf5::ToyFragmentNtuple::ToyFragmentNtuple | ( | fhicl::ParameterSet const & | ps | ) |
ToyFragmentNtuple Constructor.
ps | ParameterSet containing configuration for ToyFragmentNtuple |
ToyFragmentNtuple accepts the following Parameters: "mode" (Default: "write"): Mode to use for this FragmentDataset (only "write" mode is supported) "nWordsPerRow" (Default: 10240): Number of ADC words to report on each row of the Ntuple "fileName" (Default: "toyFragments.hdf5"): File name to use for output
Definition at line 32 of file ToyFragmentNtuple_dataset.cc.
|
inlineoverridevirtual |
Read a RawEventHeader from the Dataset (HDF5 file)
This function is not valid for this dataset plugin; it will log an error message and return nullptr
Implements artdaq::hdf5::FragmentDataset.
Definition at line 68 of file ToyFragmentNtuple.hh.
|
override |
Insert a RawEventHeader into the Event Header Ntuple Dataset (write it to the HDF5 file)
evtHdr | RawEventHeader to insert |
This function simply forwards to FragmentNtuple::insertHeader
Definition at line 102 of file ToyFragmentNtuple_dataset.cc.
|
override |
Insert a Fragment into the Fragment Ntuple Dataset (write it to the HDF5 file)
f | Fragment to insert |
If the Fragment is not a ToyFragment, it will be inserted into the FragmentNtuple datset
Definition at line 67 of file ToyFragmentNtuple_dataset.cc.
|
inlineoverridevirtual |
Read the next event from the Dataset (HDF5 file)
This function is not valid for this dataset plugin; it will log an error message and return an empty map
Implements artdaq::hdf5::FragmentDataset.
Definition at line 56 of file ToyFragmentNtuple.hh.