fire v0.19.0
Framework for sImulation and Reconstruction of Events
|
Data wrapper for atomic types. More...
#include <Data.h>
Public Member Functions | |
Data (const std::string &path, Reader *input_file=nullptr, AtomicType *handle=nullptr) | |
We don't do any more initialization except which is handled by the AbstractData. More... | |
void | load (h5::Reader &f) final override |
Down to a type that h5::Reader can handle. More... | |
void | save (Writer &f) final override |
Down to a type that io::Writer can handle. More... | |
void | structure (Writer &f) final override |
do NOT persist any structure for atomic types More... | |
Public Member Functions inherited from fire::io::AbstractData< AtomicType > | |
AbstractData (const std::string &path, Reader *input_file=nullptr, AtomicType *handle=nullptr) | |
Define the dataset path and provide an optional handle. More... | |
virtual | ~AbstractData () |
Delete our object if we own it, otherwise do nothing. More... | |
virtual void | clear () |
Define the clear function here to handle the most common cases. More... | |
virtual const AtomicType & | get () const |
Get the current in-memory data. More... | |
int | version () const |
Get the version number for the type we are loading from. More... | |
virtual void | update (const AtomicType &val) |
Update the in-memory data object with the passed value. More... | |
Public Member Functions inherited from fire::io::BaseData | |
BaseData (const std::string &path) | |
Define the full in-file path to the data set of this data. More... | |
virtual | ~BaseData ()=default |
virtual destructor so inherited classes can be properly destructed. | |
Additional Inherited Members | |
Protected Attributes inherited from fire::io::AbstractData< AtomicType > | |
std::optional< std::pair< std::string, int > > | load_type_ |
type this data is loading from | |
std::pair< std::string, int > | save_type_ |
type this data that is being used to write | |
AtomicType * | handle_ |
handle on current object in memory | |
bool | owner_ |
we own the object in memory | |
Protected Attributes inherited from fire::io::BaseData | |
std::string | path_ |
path of data set | |
Data wrapper for atomic types.
Once we finally recurse down to actual fundamental ("atomic") types, we can start actually calling the file load and save methods.
|
inlineexplicit |
We don't do any more initialization except which is handled by the AbstractData.
[in] | path | full in-file path to set holding this data |
[in] | handle | pointer to already constructed data object (optional) |
|
inlinefinaloverridevirtual |
Down to a type that h5::Reader can handle.
[in] | f | h5::Reader to load from |
Implements fire::io::AbstractData< AtomicType >.
|
inlinefinaloverridevirtual |
Down to a type that io::Writer can handle.
[in] | f | io::Writer to save to |
Implements fire::io::AbstractData< AtomicType >.
|
inlinefinaloverridevirtual |
do NOT persist any structure for atomic types
The atomic types are translated into H5 DataSets in Writer::save where the types are persisted as well.
Implements fire::io::AbstractData< AtomicType >.