Factory classes¶
pni::io::BaseClassFactory
¶
-
class
pni::io::nexus
::
BaseClassFactory
¶ base class factory
Factory class for base classes.
Public Static Functions
-
hdf5::node::Group
create
(const hdf5::node::Group &parent, const hdf5::Path &path, const std::string &class_name, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::GroupCreationList &gcpl = hdf5::property::GroupCreationList(), const hdf5::property::GroupAccessList &gapl = hdf5::property::GroupAccessList())¶ create a new base class
Create a new HDF5 group which satisfies the requirements of a base class. The function checks if the name of the group compiles with the NeXus standard.
- Return
an instance of hdf5::node::Group
- Exceptions
std::runtime_error
: in case of a failure
- Parameters
parent
: reference to the parent group on which to create the base classpath
: reference to the path to the base classclass_name
: reference to the class name of the base classlcpl
: optional reference to a link creation property listgcpl
: optional reference to a group creation property listgapl
: optional reference to a group access property list
-
hdf5::node::Group
pni::io::FieldFactory
¶
-
class
pni::io::nexus
::
FieldFactory
¶ factory class for fields
This factory class provides two static factory functions creating HDF5 datasets which comply to the NeXus rules. In particular these functions take care that the name of the dataset is compatible with the NeXus naming rules.
Public Static Functions
-
hdf5::node::Dataset
create
(const hdf5::node::Group &parent, const hdf5::Path &path, const hdf5::datatype::Datatype &type, const hdf5::dataspace::Dataspace &space, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::DatasetCreationList &dcpl = hdf5::property::DatasetCreationList(), const hdf5::property::DatasetAccessList &acpl = hdf5::property::DatasetAccessList())¶ create a dataset
Forwards all arguments to the hdf5::node::Dataset constructor after checking if the name of the field complies to the NeXus naming conventions. If this is not the case std::runtime_error is thrown.
- Exceptions
std::runtime_error
: in case of a failure
- Parameters
parent
: reference to the parent grouppath
: reference to the path of the new fieldtype
: reference to the data type of the new fieldspace
: reference to the data space of the new fieldlcpl
: optional reference to a link creation property listdcpl
: optional reference to a dataset creation property listacpl
: optional reference to a dataset access property list
-
hdf5::node::Dataset
create
(const hdf5::node::Group &parent, const hdf5::Path &path, const hdf5::datatype::Datatype &type, const hdf5::dataspace::Simple &space, const hdf5::Dimensions &chunk_shape, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::DatasetCreationList &dcpl = hdf5::property::DatasetCreationList(), const hdf5::property::DatasetAccessList &acpl = hdf5::property::DatasetAccessList())¶ create a chunked dataset
- Exceptions
std::runtime_error
: in case of a failure
- Parameters
parent
: reference to the parent grouppath
: reference to the new path of the fieldtype
: reference to the data type of the fieldspace
: reference to the data space of the fieldchunk_shape
: reference to the chunk shape of the fieldlcpl
: optional reference to a link creation property listdcpl
: optional reference to a dataset creation property listacpl
: optional reference to a dataset access property list
-
hdf5::node::Dataset
pni::io::DatatypeFactory
¶
-
class
pni::io::nexus
::
DatatypeFactory
¶ creates HDF5 datatypes from type_id_t values
This service class provides a static method constructing HDF5 datatypes from type_id_t enumerations.
Public Static Functions
-
hdf5::datatype::Datatype
create
(pni::core::type_id_t tid)¶ create HDF5 datatype from type ID
Create a new HDF5 datatype from a given type ID.
- Return
new instance of an HDF5 datatype
- Exceptions
std::runtime_error
: in case of a failure
- Parameters
tid
: type ID for which to create a new datatype
-
hdf5::datatype::Datatype