5#ifndef HDF5Utils_HistCommon_H
6#define HDF5Utils_HistCommon_H
19 void chkerr(herr_t code,
const std::string& error);
23 const std::string& key,
24 const std::string& val);
26 const std::string& key,
29 const std::string& key,
32 const std::string& key,
37 void write_axes(H5::Group& hist_grp,
const std::vector<Axis>& axes);
42 size_t n_bins(
const std::vector<double>& edges);
43 size_t n_bins(
const std::vector<int64_t>& vals);
44 size_t n_bins(
const std::vector<std::string>& labels);
45 size_t n_bins(
const std::pair<int64_t,int64_t>& range);
49 const std::string& name,
50 const std::vector<std::string>& values);
55 extern const H5::DataType
hdf5_t;
58 = H5::PredType::NATIVE_DOUBLE;
60 = H5::PredType::NATIVE_FLOAT;
62 = H5::PredType::NATIVE_INT;
64 = H5::PredType::NATIVE_LONG;
66 = H5::PredType::NATIVE_LLONG;
68 = H5::PredType::NATIVE_ULONG;
70 = H5::PredType::NATIVE_ULLONG;
72 = H5::PredType::NATIVE_UCHAR;
74 = H5::PredType::NATIVE_USHORT;
void chkerr(herr_t code, const std::string &error)
size_t n_bins(const regular_axis_t &r)
void write_bool_attr(H5::H5Object &obj, const std::string &key, bool val)
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)
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)