9#include "MantidNexus/DllConfig.h"
20class DSetCreatPropList;
41MANTID_NEXUS_DLL
bool isHdf5(std::string
const &filename);
44MANTID_NEXUS_DLL H5::DataSpace
getDataSpace(
const size_t length);
47template <
typename NumT> H5::DataType
getType();
49MANTID_NEXUS_DLL H5::Group
createGroupNXS(H5::H5File &file,
const std::string &
name,
const std::string &nxtype);
54 const std::string &cstype);
56MANTID_NEXUS_DLL H5::Group
createGroupCanSAS(H5::H5File &file,
const std::string &
name,
const std::string &nxtype,
57 const std::string &cstype);
65MANTID_NEXUS_DLL H5::DSetCreatPropList
setCompressionAttributes(
const std::size_t length,
const int deflateLevel = 6);
71template <
typename NumT>
78 const std::map<std::string, std::string> &attributes);
80template <
typename NumT>
void writeArray1D(H5::Group &
group,
const std::string &
name,
const std::vector<NumT> &values);
82MANTID_NEXUS_DLL std::string
readString(H5::H5File &file,
const std::string &address);
86MANTID_NEXUS_DLL std::string
readString(
const H5::DataSet &dataset);
88MANTID_NEXUS_DLL std::vector<std::string>
readStringVector(H5::Group &,
const std::string &);
92MANTID_NEXUS_DLL
bool hasAttribute(
const H5::H5Object &
object,
const char *attributeName);
94MANTID_NEXUS_DLL
void readStringAttribute(
const H5::H5Object &
object,
const std::string &attributeName,
97template <
typename NumT, Narrowing narrow = Narrowing::Allow>
100template <
typename NumT, Narrowing narrow = Narrowing::Allow>
103template <
typename NumT, Narrowing narrow = Narrowing::Allow>
106template <
typename NumT, Narrowing narrow = Narrowing::Allow>
109template <
typename NumT, Narrowing narrow = Narrowing::Allow>
111 const size_t length = std::numeric_limits<size_t>::max(),
112 const size_t offset =
static_cast<size_t>(0));
115MANTID_NEXUS_DLL
bool groupExists(H5::H5Object
const &h5,
const std::string &groupAddress);
118MANTID_NEXUS_DLL
bool keyHasValue(H5::H5Object
const &h5,
const std::string &key,
const std::string &
value);
121MANTID_NEXUS_DLL
void copyGroup(H5::H5Object &dest,
const std::string &destGroupAddress, H5::H5Object &src,
122 const std::string &srcGroupAddress);
128MANTID_NEXUS_DLL
void deleteObjectLink(H5::H5Object &h5,
const std::string &target);
double value
The value of the point.
MANTID_NEXUS_DLL void readStringAttribute(const H5::H5Object &object, const std::string &attributeName, std::string &output)
Narrowing
H5Util : TODO: DESCRIPTION.
MANTID_NEXUS_DLL bool groupExists(H5::H5Object const &h5, const std::string &groupAddress)
Test if a group already exists within an HDF5 file or parent group.
MANTID_NEXUS_DLL std::string readString(H5::H5File &file, const std::string &address)
void writeArray1D(H5::Group &group, const std::string &name, const std::vector< NumT > &values)
MANTID_NEXUS_DLL void writeStrAttribute(const H5::H5Object &object, const std::string &name, const std::string &value)
MANTID_NEXUS_DLL bool hasAttribute(const H5::H5Object &object, const char *attributeName)
MANTID_NEXUS_DLL H5::FileAccPropList defaultFileAcc()
Default file access is H5F_CLOSE_STRONG.
void writeNumAttribute(const H5::H5Object &object, const std::string &name, const NumT &value)
MANTID_NEXUS_DLL bool isHdf5(std::string const &filename)
Determine if a given file can be opened with HDF5 using the CORRECT file access level (H5F_CLOSE_STRO...
MANTID_NEXUS_DLL H5::DataSpace getDataSpace(const size_t length)
Create a 1D data-space to hold data of length.
MANTID_NEXUS_DLL void deleteObjectLink(H5::H5Object &h5, const std::string &target)
Delete a target link for a group or dataset from a parent group.
std::vector< NumT > readNumArrayAttributeCoerce(const H5::H5Object &object, const std::string &attributeName)
Read a numerical array from an attribute, coerced to type of OutT.
MANTID_NEXUS_DLL H5::Group createGroupCanSAS(H5::Group &group, const std::string &name, const std::string &nxtype, const std::string &cstype)
NumT readNumAttributeCoerce(const H5::H5Object &object, const std::string &attributeName)
Read a single quantity from an attribute, coerced to type of OutT.
MANTID_NEXUS_DLL bool keyHasValue(H5::H5Object const &h5, const std::string &key, const std::string &value)
Test if an attribute is present and has a specific string value for an HDF5 group or dataset.
MANTID_NEXUS_DLL H5::Group createGroupNXS(H5::H5File &file, const std::string &name, const std::string &nxtype)
void readArray1DCoerce(const H5::Group &group, const std::string &name, std::vector< NumT > &output)
MANTID_NEXUS_DLL void copyGroup(H5::H5Object &dest, const std::string &destGroupAddress, H5::H5Object &src, const std::string &srcGroupAddress)
Copy a group and all of its contents, between the same or different HDF5 files or groups.
H5::DataType getType()
Convert a primitive type to the appropriate H5::DataType.
MANTID_NEXUS_DLL std::vector< std::string > readStringVector(H5::Group &, const std::string &)
MANTID_NEXUS_DLL void write(H5::Group &group, const std::string &name, const std::string &value)
void writeScalarDataSetWithStrAttributes(H5::Group &group, const std::string &name, const T &value, const std::map< std::string, std::string > &attributes)
MANTID_NEXUS_DLL H5::DSetCreatPropList setCompressionAttributes(const std::size_t length, const int deflateLevel=6)
Sets up the chunking and compression rate.
Helper class which provides the Collimation Length for SANS instruments.