Function utils::readRequiredScalarAttr
Defined in File HDF5Utils.hpp
Function Documentation
-
auto utils::readRequiredScalarAttr(hid_t obj, const std::string &name, const std::string &context) -> double
Read a required scalar double attribute from an HDF5 object.
- Parameters:
obj – Handle to the object (a group or a dataset)
name – Name of the attribute
context – Prefix used in thrown error messages (typically the name of the calling class or function)
- Throws:
std::runtime_error – if obj has no attribute of that name
- Returns:
The attribute’s value