5#ifndef HDF5Utils_HistCommon_H
6#define HDF5Utils_HistCommon_H
21 void chkerr(herr_t code, std::string_view error);
25 const std::string& key,
26 const std::string& val);
31 const std::string& key,
34 const std::string& key,
39 void write_axes(H5::Group& hist_grp,
const std::vector<Axis>& axes);
44 size_t n_bins(
const std::vector<double>& edges);
45 size_t n_bins(
const std::vector<int64_t>& vals);
46 size_t n_bins(
const std::vector<std::string>& labels);
47 size_t n_bins(
const std::pair<int64_t,int64_t>& range);
51 const std::string& name,
52 const std::vector<std::string>& values);
57 extern const H5::DataType
hdf5_t;
60 = H5::PredType::NATIVE_DOUBLE;
62 = H5::PredType::NATIVE_FLOAT;
64 = H5::PredType::NATIVE_INT;
66 = H5::PredType::NATIVE_LONG;
68 = H5::PredType::NATIVE_LLONG;
70 = H5::PredType::NATIVE_ULONG;
72 = H5::PredType::NATIVE_ULLONG;
74 = H5::PredType::NATIVE_UCHAR;
76 = H5::PredType::NATIVE_USHORT;
size_t n_bins(const regular_axis_t &r)
void write_axes(H5::Group &hist_grp, const std::vector< Axis > &axes)
void write_str_attr(H5::H5Object &obj, const std::string &key, const std::string &val)
void write_str_dataset(H5::Group &parent, const std::string &name, const std::vector< std::string > &values)
void chkerr(herr_t code, std::string_view error)
const H5::DataType hdf5_t
void write_int_attr(H5::H5Object &obj, const std::string &key, int64_t val)
void write_double_attr(H5::H5Object &obj, const std::string &key, double val)
void write_bool_attr(H5::H5Object &obj, const char *key, bool val)