1 #ifndef MHO_HDF5ConversionHelpers_HH__
2 #define MHO_HDF5ConversionHelpers_HH__
41 for(
auto it = j.begin(); it != j.end(); ++it)
43 const std::string& key = it.key();
46 if(
value.is_object() )
48 hid_t subgroup = H5Gcreate(parent_group, key.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
52 else if (
value.is_array() &&
value.size() != 0)
54 if( !(
value.begin()->is_object()) )
60 hid_t array_group = H5Gcreate(parent_group, key.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
62 for (
const auto& elem :
value)
64 std::string item_name = std::to_string(idx++);
65 hid_t item_group = H5Gcreate(array_group, item_name.c_str(), H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
69 H5Gclose(array_group);
Definition: MHO_ChannelLabeler.hh:17
void make_attribute(const std::string &key, XValueType value, hid_t parent_dataset_id)
Definition: MHO_HDF5Attributes.hh:38
void json_to_hdf5_attributes(const mho_json &j, hid_t parent_group)
Definition: MHO_HDF5ConversionHelpers.hh:39