From 76adc3274730d4a309022143c5b3ae6e10010e71 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Wed, 7 Feb 2018 15:54:20 +0100 Subject: [PATCH] Transition format to shared_ptr --- src/H5Format.cpp | 54 +- src/H5Format.hpp | 20 +- src/NXmxFormat.cpp | 1777 ++++++++++++++++++++++---------------------- 3 files changed, 939 insertions(+), 912 deletions(-) diff --git a/src/H5Format.cpp b/src/H5Format.cpp index 4a76736..ecc51c6 100644 --- a/src/H5Format.cpp +++ b/src/H5Format.cpp @@ -7,6 +7,7 @@ using namespace std; + hsize_t H5FormatUtils::expand_dataset(H5::DataSet& dataset, hsize_t frame_index, hsize_t dataset_increase_step) { hsize_t dataset_rank = 3; @@ -56,6 +57,12 @@ const boost::any& H5FormatUtils::get_value_from_reference(const string& dataset_ { try { auto reference_string = boost::any_cast(value_reference); + + #ifdef DEBUG_OUTPUT + cout << "[H5FormatUtils::get_value_from_reference] Getting dataset " << dataset_name; + cout << " reference value '" << reference_string << "'." << endl; + #endif + return values.at(reference_string); } catch (const boost::bad_any_cast& exception) { @@ -107,7 +114,7 @@ H5::PredType H5FormatUtils::get_dataset_data_type(const string& type) H5::DataSet H5FormatUtils::write_dataset(H5::Group& target, const h5_dataset& dataset, const map& values) { - string name = dataset.name; + const string& name = dataset.name; boost::any value; // Value is stored directly in the struct. @@ -264,33 +271,37 @@ void H5FormatUtils::write_format_data(H5::Group& file_node, const h5_parent& for { auto node_group = H5FormatUtils::create_group(file_node, format_node.name); - for (const auto item : format_node.items) { + for (const auto item_ptr : format_node.items) { + const h5_base& item = *item_ptr; - if (item->node_type == GROUP) { - auto sub_group = dynamic_cast(item); + if (item.node_type == GROUP) { + auto sub_group = dynamic_cast(item); - write_format_data(node_group, *sub_group, values); - } else if (item->node_type == ATTRIBUTE) { - auto sub_attribute = dynamic_cast(item); + write_format_data(node_group, sub_group, values); - H5FormatUtils::write_attribute(node_group, *sub_attribute, values); - } else if (item->node_type == DATASET) { - auto sub_dataset = dynamic_cast(item); - auto current_dataset = H5FormatUtils::write_dataset(node_group, *sub_dataset, values); + } else if (item.node_type == ATTRIBUTE) { + auto sub_attribute = dynamic_cast(item); + + H5FormatUtils::write_attribute(node_group, sub_attribute, values); - for (const auto dataset_attr : sub_dataset->items) { + } else if (item.node_type == DATASET) { + auto sub_dataset = dynamic_cast(item); + auto current_dataset = H5FormatUtils::write_dataset(node_group, sub_dataset, values); + + for (const auto dataset_attr_ptr : sub_dataset.items) { + const h5_base& dataset_attr = *dataset_attr_ptr; // You can specify only attributes inside a dataset. - if (dataset_attr->node_type != ATTRIBUTE) { + if (dataset_attr.node_type != ATTRIBUTE) { stringstream error_message; - error_message << "Invalid element " << dataset_attr->name << " on dataset " << sub_dataset->name << ". Only attributes allowd."; + error_message << "Invalid element " << dataset_attr.name << " on dataset " << sub_dataset.name << ". Only attributes allowd."; throw invalid_argument( error_message.str() ); } - auto sub_attribute = dynamic_cast(dataset_attr); + auto sub_attribute = dynamic_cast(dataset_attr); - H5FormatUtils::write_attribute(current_dataset, *sub_attribute, values); + H5FormatUtils::write_attribute(current_dataset, sub_attribute, values); } } } @@ -298,14 +309,15 @@ void H5FormatUtils::write_format_data(H5::Group& file_node, const h5_parent& for void H5FormatUtils::write_format(H5::H5File& file, const H5Format& format, const std::map& input_values) { - auto format_definition = format.get_format_definition(); - auto values = format.get_default_values(); + auto default_values = format.get_default_values(); + + map format_values(default_values); - format.add_input_values(*values, input_values); - format.add_calculated_values(*values); + format.add_input_values(format_values, input_values); + format.add_calculated_values(format_values); - write_format_data(file, *format_definition, *values); + write_format_data(file, format_definition, format_values); file.move(format.get_raw_frames_dataset_name().c_str(), format.get_frames_dataset_name().c_str()); } \ No newline at end of file diff --git a/src/H5Format.hpp b/src/H5Format.hpp index 7023b7f..bf6f1d5 100644 --- a/src/H5Format.hpp +++ b/src/H5Format.hpp @@ -5,6 +5,7 @@ #include #include #include +#include #include @@ -37,7 +38,7 @@ enum DATA_LOCATION struct h5_base { h5_base(const std::string& name, NODE_TYPE node_type) : name(name), node_type(node_type){}; - virtual ~h5_base(){}; + virtual ~h5_base(){} std::string name; NODE_TYPE node_type; }; @@ -45,24 +46,27 @@ struct h5_base struct h5_data_base { h5_data_base(DATA_TYPE data_type, DATA_LOCATION data_location) : data_type(data_type), data_location(data_location) {}; + virtual ~h5_data_base(){} DATA_TYPE data_type; DATA_LOCATION data_location; }; struct h5_parent: public h5_base { - h5_parent(const std::string& name, NODE_TYPE node_type, const std::list& items) : h5_base(name, node_type), items(items) {}; - std::list items; + h5_parent(const std::string& name, NODE_TYPE node_type, const std::list>& items) : + h5_base(name, node_type), items(items) {}; + std::list> items; }; struct h5_group : public h5_parent { - h5_group(const std::string& name, const std::list& items) : h5_parent(name, GROUP, items) {}; + h5_group(const std::string& name, const std::list>& items) : + h5_parent(name, GROUP, items) {}; }; struct h5_dataset : public h5_parent, public h5_data_base { - h5_dataset(const std::string& name, const std::string& value, DATA_TYPE data_type, const std::list& items={}) + h5_dataset(const std::string& name, const std::string& value, DATA_TYPE data_type, const std::list>& items={}) : h5_parent(name, DATASET, items), h5_data_base(data_type, REFERENCE), value(value) {}; std::string value; @@ -80,9 +84,9 @@ class H5Format public: virtual ~H5Format(){}; - virtual const std::map* get_input_value_type() const = 0; - virtual std::map* get_default_values() const = 0; - virtual const h5_group* get_format_definition() const = 0; + virtual const std::map& get_input_value_type() const = 0; + virtual const std::map& get_default_values() const = 0; + virtual const h5_group& get_format_definition() const = 0; virtual void add_calculated_values(std::map& values) const = 0; virtual void add_input_values(std::map& values, const std::map& input_values) const = 0; diff --git a/src/NXmxFormat.cpp b/src/NXmxFormat.cpp index 49da456..abaa61c 100644 --- a/src/NXmxFormat.cpp +++ b/src/NXmxFormat.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "H5Format.hpp" @@ -9,7 +10,891 @@ using namespace std; class NXmxFormat : public H5Format { + shared_ptr> input_value_type = NULL; + shared_ptr> default_values = NULL; + shared_ptr file_format = NULL; + public: + + NXmxFormat() + { + input_value_type.reset( + new map({ + {"sl2wv", NX_FLOAT}, + {"sl0ch", NX_FLOAT}, + {"sl2wh", NX_FLOAT}, + {"temp_mono_cryst_1", NX_FLOAT}, + {"harmonic", NX_INT}, + {"mokev", NX_FLOAT}, + {"sl2cv", NX_FLOAT}, + {"bpm4_gain_setting", NX_FLOAT}, + {"mirror_coating", NX_CHAR}, + {"samx", NX_FLOAT}, + {"sample_name", NX_CHAR}, + {"bpm5y", NX_FLOAT}, + {"sl2ch", NX_FLOAT}, + {"curr", NX_FLOAT}, + {"bs2_status", NX_CHAR}, + {"bs2y", NX_FLOAT}, + {"diode", NX_FLOAT}, + {"samy", NX_FLOAT}, + {"sl4ch", NX_FLOAT}, + {"sl4wh", NX_FLOAT}, + {"temp_mono_cryst_2", NX_FLOAT}, + {"sl3wh", NX_FLOAT}, + {"mith", NX_FLOAT}, + {"bs1_status", NX_CHAR}, + {"bpm4s", NX_FLOAT}, + {"sl0wh", NX_FLOAT}, + {"bpm6z", NX_FLOAT}, + {"bs1y", NX_FLOAT}, + {"scan", NX_CHAR}, + {"bpm5_gain_setting", NX_FLOAT}, + {"bpm4z", NX_FLOAT}, + {"bpm4x", NX_FLOAT}, + {"date", NX_DATE_TIME}, + {"mibd", NX_FLOAT}, + {"temp", NX_FLOAT}, + {"idgap", NX_FLOAT}, + {"sl4cv", NX_FLOAT}, + {"sl1wv", NX_FLOAT}, + {"sl3wv", NX_FLOAT}, + {"sl1ch", NX_FLOAT}, + {"bs2x", NX_FLOAT}, + {"bpm6_gain_setting", NX_FLOAT}, + {"bpm4y", NX_FLOAT}, + {"bpm6s", NX_FLOAT}, + {"sample_description", NX_CHAR}, + {"bpm5z", NX_FLOAT}, + {"moth1", NX_FLOAT}, + {"sec", NX_NUMBER}, + {"sl3cv", NX_FLOAT}, + {"bs1x", NX_FLOAT}, + {"bpm6_saturation_value", NX_FLOAT}, + {"bpm5s", NX_FLOAT}, + {"mobd", NX_FLOAT}, + {"sl1wh", NX_FLOAT}, + {"sl4wv", NX_FLOAT}, + {"bs2_det_dist", NX_FLOAT}, + {"bpm5_saturation_value", NX_FLOAT}, + {"fil_comb_description", NX_CHAR}, + {"bpm5x", NX_FLOAT}, + {"bpm4_saturation_value", NX_FLOAT}, + {"bs1_det_dist", NX_FLOAT}, + {"sl3ch", NX_FLOAT}, + {"bpm6y", NX_FLOAT}, + {"sl1cv", NX_FLOAT}, + {"bpm6x", NX_FLOAT}, + {"ftrans", NX_FLOAT}, + {"samz", NX_FLOAT}, + })); + + default_values.reset(new std::map( + { + {"filter_set/description", "The filter set consists of 4 linear stages, each with five filter positions. Additionally each one allows for an out position to allow no filtering."}, + {"XBPM4/calibration_date", "???"}, + {"crystal_2/type", "Si"}, + {"beam_stop_2/size_y", 2.25}, + {"source/name", "Swiss Light Source"}, + {"beam_stop_2/size_x", 5.0}, + {"slit_1/material", "OFHC Cu"}, + {"monochromator/type", "Double crystal fixed exit monochromator"}, + {"XBPM4_skew/description", "Normalized difference of counts between diagonal quadrants"}, + {"XBPM6/type", "???"}, + {"XBPM6/description", "Four quadrant x-ray beam position monitor"}, + {"slit_3/material", "Si"}, + {"XBPM5/group_index", 3}, + {"crystal_1/type", "Si"}, + {"insertion_device/length", 1820.0}, + {"XBPM5_skew/description", "Normalized difference of counts between diagonal quadrants"}, + {"XBPM5_y/description", "Normalized difference of counts between high and low quadrants"}, + {"source/sigma_x", 0.202}, + {"XBPM5/type", "???"}, + {"XBPM4_x/description", "Normalized difference of counts between left and right quadrants"}, + {"XBPM4/group_names", "XBPM4, XBPM4_sum, XBPM4_x, XBPM4_y, XBPM4_skew"}, + {"slit_2/description", "Slit 2, optics hutch"}, + {"mirror/substrate_material", "SiO2"}, + {"XBPM5/group_names", "XBPM5, XBPM5_sum, XBPM5_x, XBPM5_y, XBPM5_skew"}, + {"control/note", "monitor"}, + {"monochromator/wavelength_spread", 0.0001}, + {"XBPM6/calibration_date", "???"}, + {"source/divergence_x", 0.000135}, + {"XBPM4_y/description", "Normalized difference of counts between high and low quadrants"}, + {"XBPM6_sum/description", "Sum of counts for the four quadrants"}, + {"crystal_1/order_no", 1}, + {"slit_3/description", "Slit 3, experimental hutch, exposure box"}, + {"XBPM5_sum/description", "Sum of counts for the four quadrants"}, + {"insertion_device/k", 2.46}, + {"insertion_device/type", "undulator"}, + {"XBPM6/group_index", 4}, + {"entry/definition", "NXsas"}, + {"crystal_2/usage", "Bragg"}, + {"entry/end_time", "???"}, + {"XBPM6_skew/description", "Normalized difference of counts between diagonal quadrants"}, + {"XBPM6_y/description", "Normalized difference of counts between high and low quadrants"}, + {"crystal_2/order_no", 2}, + {"XBPM6_x/description", "Normalized difference of counts between left and right quadrants"}, + {"mirror/type", "single"}, + {"sample/aequatorial_angle", 1.0}, + {"XBPM6/group_names", "XBPM6, XBPM6_sum, XBPM6_x, XBPM6_y, XBPM6_skew"}, + {"slit_4/material", "Si"}, + {"beam_stop_1/description", "circular"}, + {"source/sigma_y", 0.018}, + {"XBPM5/description", "Four quadrant x-ray beam position monitor"}, + {"slit_2/material", "Ag"}, + {"XBPM4/distance", 0.0}, + {"beam_stop_1/size", 3.0}, + {"XBPM5_x/description", "Normalized difference of counts between left and right quadrants"}, + {"XBPM5/calibration_date", "???"}, + {"XBPM4/type", "???"}, + {"XBPM4_sum/description", "Sum of counts for the four quadrants"}, + {"slit_0/description", "Horizontal secondary source slit"}, + {"source/divergence_y", 2.5e-05}, + {"crystal_1/usage", "Bragg"}, + {"slit_4/description", "Slit 4, experimental hutch, exposure box"}, + {"control/mode", "Value from bpm4s"}, + {"XBPM4/description", "Four quadrant x-ray beam position monitor"}, + {"XBPM5/distance", 0.0}, + {"XBPM6/distance", 0.0}, + {"source/probe", "x-ray"}, + {"slit_1/description", "Slit 1, optics hutch"}, + {"instrument/name", "cSAXS beamline"}, + {"XBPM4/group_index", 2}, + {"mirror/description", "Grazing incidence mirror to reject high-harmonic wavelengths from the monochromator. There are three coating options available that are used depending on the X-ray energy, no coating (SiO2), rhodium (Rh) or platinum (Pt)."}, + {"slit_0/material", "OFHC Cu"}, + {"beam_stop_2/description", "rectangular"}, + {"source/type", "Synchrotron X-ray Source"}, + // TODO: This are temp for dataset arrays. Implement size based on type. + {"crystal_1/reflection", 1}, + {"crystal_2/reflection", 1}, + {"XBPM4/group_parent", 1}, + {"XBPM5/group_parent", 1}, + {"XBPM6/group_parent", 1}, + })); + + shared_ptr(new h5_group("", {})); + + + file_format.reset( + new h5_group("entry", { + shared_ptr(new h5_attr("NX_class", "NXentry", NX_CHAR)), + + shared_ptr(new h5_dataset("start_time", "entry/start_time", NX_DATE_TIME, { + shared_ptr(new h5_attr("NX_class", "NX_DATE_TIME", NX_CHAR)) + })), + shared_ptr(new h5_dataset("title", "entry/title", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("definition", "entry/definition", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("end_time", "entry/end_time", NX_DATE_TIME, { + shared_ptr(new h5_attr("NX_class", "NX_DATE_TIME", NX_CHAR)) + })), + + shared_ptr(new h5_group("plottable_data", { + shared_ptr(new h5_attr("NX_class", "NXdata", NX_CHAR)), + })), + + shared_ptr(new h5_group("sample", { + shared_ptr(new h5_attr("NX_class", "NXsample", NX_CHAR)), + + shared_ptr(new h5_dataset("name", "sample/name", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("y_translation", "sample/y_translation", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_translation", "sample/x_translation", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("aequatorial_angle", "sample/aequatorial_angle", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_ANGLE", "deg", NX_CHAR)) + })), + shared_ptr(new h5_dataset("temperature_log", "sample/temperature_log", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "sample/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("control", { + shared_ptr(new h5_attr("NX_class", "NXmonitor", NX_CHAR)), + + shared_ptr(new h5_dataset("mode", "control/mode", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("note", "control/note", NXnote, { + shared_ptr(new h5_attr("NX_class", "NXnote", NX_CHAR)) + })), + shared_ptr(new h5_dataset("integral", "control/integral", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("instrument", { + shared_ptr(new h5_attr("NX_class", "NXinstrument", NX_CHAR)), + + shared_ptr(new h5_dataset("name", "instrument/name", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + + shared_ptr(new h5_group("source", { + shared_ptr(new h5_attr("NX_class", "NXsource", NX_CHAR)), + + shared_ptr(new h5_dataset("name", "source/name", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "source/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("sigma_y", "source/sigma_y", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("probe", "source/probe", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("current", "source/current", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_CURRENT", "mA", NX_CHAR)) + })), + shared_ptr(new h5_dataset("divergence_x", "source/divergence_x", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_ANGLE", "radians", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "source/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("divergence_y", "source/divergence_y", NX_FLOAT, { + shared_ptr(new h5_attr("NX_ANGLE", "radians", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("sigma_x", "source/sigma_x", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("insertion_device", { + shared_ptr(new h5_attr("NX_class", "NXinsertion_device", NX_CHAR)), + + shared_ptr(new h5_dataset("k", "insertion_device/k", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_DIMENSIONLESS", "True", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "insertion_device/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("length", "insertion_device/length", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("gap", "insertion_device/gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("harmonic", "insertion_device/harmonic", NX_INT, { + shared_ptr(new h5_attr("NX_UNITLESS", "true", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("mirror", { + shared_ptr(new h5_attr("NX_class", "NXmirror", NX_CHAR)), + + shared_ptr(new h5_dataset("distance", "mirror/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("coating_material", "mirror/coating_material", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("incident_angle", "mirror/incident_angle", NX_FLOAT, { + shared_ptr(new h5_attr("NX_ANGLE", "degrees", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("bend_y", "mirror/bend_y", NX_FLOAT, { + shared_ptr(new h5_attr("NX_ANY", "", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "mirror/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("substrate_material", "mirror/substrate_material", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "mirror/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("slit_3", { + shared_ptr(new h5_attr("NX_class", "NXslit", NX_CHAR)), + + shared_ptr(new h5_dataset("height", "slit_3/height", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("material", "slit_3/material", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "slit_3/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("y_gap", "slit_3/y_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_translation", "slit_3/x_translation", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "slit_3/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_gap", "slit_3/x_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("monochromator", { + shared_ptr(new h5_attr("NX_class", "NXmonochromator", NX_CHAR)), + + shared_ptr(new h5_dataset("wavelength_spread", "monochromator/wavelength_spread", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("energy", "monochromator/energy", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_ENERGY", "keV", NX_CHAR)) + })), + shared_ptr(new h5_dataset("wavelength", "monochromator/wavelength", NX_FLOAT, { + shared_ptr(new h5_attr("NX_WAVELENGTH", "Angstrom", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "monochromator/type", NXnote, { + shared_ptr(new h5_attr("NX_class", "NXnote", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "monochromator/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + + shared_ptr(new h5_group("crystal_1", { + shared_ptr(new h5_attr("NX_class", "NXcrystal", NX_CHAR)), + + shared_ptr(new h5_dataset("reflection", "crystal_1/reflection", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)), + shared_ptr(new h5_attr("NX_UNITLESS", "", NX_CHAR)) + })), + shared_ptr(new h5_dataset("order_no", "crystal_1/order_no", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("temperature", "crystal_1/temperature", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "crystal_1/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("bragg_angle", "crystal_1/bragg_angle", NX_FLOAT, { + shared_ptr(new h5_attr("NX_ANGLE", "degrees", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("usage", "crystal_1/usage", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("crystal_2", { + shared_ptr(new h5_attr("NX_class", "NXcrystal", NX_CHAR)), + + shared_ptr(new h5_dataset("bend_x", "crystal_2/bend_x", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_ANY", "", NX_CHAR)) + })), + shared_ptr(new h5_dataset("usage", "crystal_2/usage", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("reflection", "crystal_2/reflection", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)), + shared_ptr(new h5_attr("NX_UNITLESS", "", NX_CHAR)) + })), + shared_ptr(new h5_dataset("order_no", "crystal_2/order_no", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "crystal_2/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("bragg_angle", "crystal_2/bragg_angle", NX_FLOAT, { + shared_ptr(new h5_attr("NX_ANGLE", "degrees", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("temperature", "crystal_2/temperature", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })) + })), + + shared_ptr(new h5_group("XBPM5", { + shared_ptr(new h5_attr("NX_class", "NXdetector_group", NX_CHAR)), + + shared_ptr(new h5_dataset("group_parent", "XBPM5/group_parent", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("group_index", "XBPM5/group_index", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("group_names", "XBPM5/group_names", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + + shared_ptr(new h5_group("XBPM5_y", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("description", "XBPM5_y/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("data", "XBPM5_y/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM5_sum", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("description", "XBPM5_sum/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("data", "XBPM5_sum/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("saturation_value", "XBPM5_sum/saturation_value", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM5_skew", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "XBPM5_skew/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM5_skew/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM5", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("gain_setting", "XBPM5/gain_setting", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "XBPM5/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM5/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("calibration_date", "XBPM5/calibration_date", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "XBPM5/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("count_time", "XBPM5/count_time", NX_NUMBER, { + shared_ptr(new h5_attr("NX_TIME", "s", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_NUMBER", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM5_x", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "XBPM5_x/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM5_x/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })) + })), + + shared_ptr(new h5_group("slit_1", { + shared_ptr(new h5_attr("NX_class", "NXslit", NX_CHAR)), + + shared_ptr(new h5_dataset("material", "slit_1/material", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_translation", "slit_1/x_translation", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_gap", "slit_1/x_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "slit_1/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("height", "slit_1/height", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "slit_1/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("y_gap", "slit_1/y_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("slit_2", { + shared_ptr(new h5_attr("NX_class", "NXslit", NX_CHAR)), + + shared_ptr(new h5_dataset("y_gap", "slit_2/y_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "slit_2/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_translation", "slit_2/x_translation", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("material", "slit_2/material", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("height", "slit_2/height", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "slit_2/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_gap", "slit_2/x_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("beam_stop_1", { + shared_ptr(new h5_attr("NX_class", "NX_beamstop", NX_CHAR)), + + shared_ptr(new h5_dataset("status", "beam_stop_1/status", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("y", "beam_stop_1/y", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("size", "beam_stop_1/size", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "beam_stop_1/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x", "beam_stop_1/x", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance_to_detector", "beam_stop_1/distance_to_detector", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("slit_0", { + shared_ptr(new h5_attr("NX_class", "NXslit", NX_CHAR)), + + shared_ptr(new h5_dataset("description", "slit_0/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_translation", "slit_0/x_translation", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("material", "slit_0/material", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "slit_0/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_gap", "slit_0/x_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("slit_4", { + shared_ptr(new h5_attr("NX_class", "NXslit", NX_CHAR)), + + shared_ptr(new h5_dataset("y_gap", "slit_4/y_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "slit_4/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("material", "slit_4/material", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_gap", "slit_4/x_gap", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x_translation", "slit_4/x_translation", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("height", "slit_4/height", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "slit_4/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("beam_stop_2", { + shared_ptr(new h5_attr("NX_class", "NX_beamstop", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "beam_stop_2/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("size_y", "beam_stop_2/size_y", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "beam_stop_2/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("x", "beam_stop_2/x", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("size_x", "beam_stop_2/size_x", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("y", "beam_stop_2/y", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance_to_detector", "beam_stop_2/distance_to_detector", NX_FLOAT, { + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("status", "beam_stop_2/status", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("filter_set", { + shared_ptr(new h5_attr("NX_class", "NXattenuator", NX_CHAR)), + + shared_ptr(new h5_dataset("description", "filter_set/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "filter_set/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)), + shared_ptr(new h5_attr("NX_LENGTH", "mm", NX_CHAR)) + })), + shared_ptr(new h5_dataset("attenuator_transmission", "filter_set/attenuator_transmission", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "filter_set/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM4", { + shared_ptr(new h5_attr("NX_class", "NXdetector_group", NX_CHAR)), + + shared_ptr(new h5_dataset("group_names", "XBPM4/group_names", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("group_index", "XBPM4/group_index", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("group_parent", "XBPM4/group_parent", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + + shared_ptr(new h5_group("XBPM4_x", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "XBPM4_x/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM4_x/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM4", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("gain_setting", "XBPM4/gain_setting", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("calibration_date", "XBPM4/calibration_date", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM4/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "XBPM4/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "XBPM4/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("count_time", "XBPM4/count_time", NX_NUMBER, { + shared_ptr(new h5_attr("NX_TIME", "s", NX_CHAR)), + shared_ptr(new h5_attr("NX_class", "NX_NUMBER", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM4_skew", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("description", "XBPM4_skew/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("data", "XBPM4_skew/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM4_y", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "XBPM4_y/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM4_y/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM4_sum", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("saturation_value", "XBPM4_sum/saturation_value", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM4_sum/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("data", "XBPM4_sum/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })) + })), + + shared_ptr(new h5_group("XBPM6", { + shared_ptr(new h5_attr("NX_class", "NXdetector_group", NX_CHAR)), + + shared_ptr(new h5_dataset("group_names", "XBPM6/group_names", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("group_index", "XBPM6/group_index", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("group_parent", "XBPM6/group_parent", NX_INT, { + shared_ptr(new h5_attr("NX_class", "NX_INT", NX_CHAR)) + })), + + shared_ptr(new h5_group("XBPM6_skew", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "XBPM6_skew/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM6_skew/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM6_x", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "XBPM6_x/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM6_x/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM6_y", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("data", "XBPM6_y/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("description", "XBPM6_y/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM6", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("description", "XBPM6/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("type", "XBPM6/type", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("count_time", "XBPM6/count_time", NX_NUMBER, { + shared_ptr(new h5_attr("NX_class", "NX_NUMBER", NX_CHAR)), + shared_ptr(new h5_attr("NX_TIME", "s", NX_CHAR)) + })), + shared_ptr(new h5_dataset("distance", "XBPM6/distance", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("calibration_date", "XBPM6/calibration_date", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("gain_setting", "XBPM6/gain_setting", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })), + + shared_ptr(new h5_group("XBPM6_sum", { + shared_ptr(new h5_attr("NX_class", "NX_detector", NX_CHAR)), + + shared_ptr(new h5_dataset("description", "XBPM6_sum/description", NX_CHAR, { + shared_ptr(new h5_attr("NX_class", "NX_CHAR", NX_CHAR)) + })), + shared_ptr(new h5_dataset("saturation_value", "XBPM6_sum/saturation_value", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })), + shared_ptr(new h5_dataset("data", "XBPM6_sum/data", NX_FLOAT, { + shared_ptr(new h5_attr("NX_class", "NX_FLOAT", NX_CHAR)) + })) + })) + })) + })) + })); + } + + string get_raw_frames_dataset_name() const override { return "raw_data"; } @@ -18,819 +903,15 @@ class NXmxFormat : public H5Format return "entry/plottable_data/data"; } - const h5_group* get_format_definition() const override { - - auto format = - new h5_group("entry", { - new h5_attr("NX_class", "NXentry", NX_CHAR), - - new h5_dataset("start_time", "entry/start_time", NX_DATE_TIME, { - new h5_attr("NX_class", "NX_DATE_TIME", NX_CHAR) - }), - new h5_dataset("end_time", "entry/end_time", NX_DATE_TIME, { - new h5_attr("NX_class", "NX_DATE_TIME", NX_CHAR) - }), - new h5_dataset("definition", "entry/definition", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("title", "entry/title", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - - new h5_group("control", { - new h5_attr("NX_class", "NXmonitor", NX_CHAR), - - new h5_dataset("mode", "control/mode", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("note", "control/note", NXnote, { - new h5_attr("NX_class", "NXnote", NX_CHAR) - }), - new h5_dataset("integral", "control/integral", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("instrument", { - new h5_attr("NX_class", "NXinstrument", NX_CHAR), - - new h5_dataset("name", "instrument/name", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - - new h5_group("insertion_device", { - new h5_attr("NX_class", "NXinsertion_device", NX_CHAR), - - new h5_dataset("gap", "insertion_device/gap", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("k", "insertion_device/k", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_DIMENSIONLESS", "True", NX_CHAR) - }), - new h5_dataset("harmonic", "insertion_device/harmonic", NX_INT, { - new h5_attr("NX_UNITLESS", "true", NX_CHAR), - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - new h5_dataset("length", "insertion_device/length", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("type", "insertion_device/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("XBPM5", { - new h5_attr("NX_class", "NXdetector_group", NX_CHAR), - - new h5_dataset("group_parent", "XBPM5/group_parent", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - new h5_dataset("group_names", "XBPM5/group_names", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("group_index", "XBPM5/group_index", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - - new h5_group("XBPM5_x", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("data", "XBPM5_x/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "XBPM5_x/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("XBPM5_y", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("description", "XBPM5_y/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("data", "XBPM5_y/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("XBPM5_sum", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("data", "XBPM5_sum/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "XBPM5_sum/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("saturation_value", "XBPM5_sum/saturation_value", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("XBPM5_skew", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("description", "XBPM5_skew/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("data", "XBPM5_skew/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("XBPM5", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("description", "XBPM5/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("distance", "XBPM5/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("count_time", "XBPM5/count_time", NX_NUMBER, { - new h5_attr("NX_class", "NX_NUMBER", NX_CHAR), - new h5_attr("NX_TIME", "s", NX_CHAR) - }), - new h5_dataset("calibration_date", "XBPM5/calibration_date", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("type", "XBPM5/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("gain_setting", "XBPM5/gain_setting", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }) - }), - - new h5_group("XBPM4", { - new h5_attr("NX_class", "NXdetector_group", NX_CHAR), - - new h5_dataset("group_names", "XBPM4/group_names", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("group_index", "XBPM4/group_index", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - new h5_dataset("group_parent", "XBPM4/group_parent", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - - new h5_group("XBPM4_sum", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("data", "XBPM4_sum/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("saturation_value", "XBPM4_sum/saturation_value", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "XBPM4_sum/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("XBPM4_skew", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("data", "XBPM4_skew/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "XBPM4_skew/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("XBPM4_x", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("description", "XBPM4_x/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("data", "XBPM4_x/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("XBPM4", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("distance", "XBPM4/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("calibration_date", "XBPM4/calibration_date", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("description", "XBPM4/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("type", "XBPM4/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("gain_setting", "XBPM4/gain_setting", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("count_time", "XBPM4/count_time", NX_NUMBER, { - new h5_attr("NX_TIME", "s", NX_CHAR), - new h5_attr("NX_class", "NX_NUMBER", NX_CHAR) - }) - }), - - new h5_group("XBPM4_y", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("data", "XBPM4_y/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "XBPM4_y/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }) - }), - - new h5_group("beam_stop_2", { - new h5_attr("NX_class", "NX_beamstop", NX_CHAR), - - new h5_dataset("y", "beam_stop_2/y", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("status", "beam_stop_2/status", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("size_x", "beam_stop_2/size_x", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("data", "beam_stop_2/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("description", "beam_stop_2/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("size_y", "beam_stop_2/size_y", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x", "beam_stop_2/x", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("distance_to_detector", "beam_stop_2/distance_to_detector", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("beam_stop_1", { - new h5_attr("NX_class", "NX_beamstop", NX_CHAR), - - new h5_dataset("size", "beam_stop_1/size", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("y", "beam_stop_1/y", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("description", "beam_stop_1/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("distance_to_detector", "beam_stop_1/distance_to_detector", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x", "beam_stop_1/x", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("status", "beam_stop_1/status", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("filter_set", { - new h5_attr("NX_class", "NXattenuator", NX_CHAR), - - new h5_dataset("type", "filter_set/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("distance", "filter_set/distance", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "filter_set/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("attenuator_transmission", "filter_set/attenuator_transmission", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("slit_4", { - new h5_attr("NX_class", "NXslit", NX_CHAR), - - new h5_dataset("height", "slit_4/height", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("distance", "slit_4/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x_gap", "slit_4/x_gap", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("description", "slit_4/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("y_gap", "slit_4/y_gap", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("material", "slit_4/material", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("x_translation", "slit_4/x_translation", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("slit_2", { - new h5_attr("NX_class", "NXslit", NX_CHAR), - - new h5_dataset("y_gap", "slit_2/y_gap", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("distance", "slit_2/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x_gap", "slit_2/x_gap", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x_translation", "slit_2/x_translation", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("description", "slit_2/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("height", "slit_2/height", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("material", "slit_2/material", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("source", { - new h5_attr("NX_class", "NXsource", NX_CHAR), - - new h5_dataset("divergence_y", "source/divergence_y", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_ANGLE", "radians", NX_CHAR) - }), - new h5_dataset("divergence_x", "source/divergence_x", NX_FLOAT, { - new h5_attr("NX_ANGLE", "radians", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("current", "source/current", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_CURRENT", "mA", NX_CHAR) - }), - new h5_dataset("distance", "source/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("sigma_x", "source/sigma_x", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("type", "source/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("probe", "source/probe", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("sigma_y", "source/sigma_y", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("name", "source/name", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("mirror", { - new h5_attr("NX_class", "NXmirror", NX_CHAR), - - new h5_dataset("description", "mirror/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("substrate_material", "mirror/substrate_material", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("distance", "mirror/distance", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("bend_y", "mirror/bend_y", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_ANY", "", NX_CHAR) - }), - new h5_dataset("incident_angle", "mirror/incident_angle", NX_FLOAT, { - new h5_attr("NX_ANGLE", "degrees", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("coating_material", "mirror/coating_material", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("type", "mirror/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("slit_3", { - new h5_attr("NX_class", "NXslit", NX_CHAR), - - new h5_dataset("y_gap", "slit_3/y_gap", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("distance", "slit_3/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("height", "slit_3/height", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x_translation", "slit_3/x_translation", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("material", "slit_3/material", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("description", "slit_3/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("x_gap", "slit_3/x_gap", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("slit_1", { - new h5_attr("NX_class", "NXslit", NX_CHAR), - - new h5_dataset("x_gap", "slit_1/x_gap", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x_translation", "slit_1/x_translation", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("y_gap", "slit_1/y_gap", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "slit_1/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("material", "slit_1/material", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("distance", "slit_1/distance", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("height", "slit_1/height", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("monochromator", { - new h5_attr("NX_class", "NXmonochromator", NX_CHAR), - - new h5_dataset("wavelength", "monochromator/wavelength", NX_FLOAT, { - new h5_attr("NX_WAVELENGTH", "Angstrom", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("wavelength_spread", "monochromator/wavelength_spread", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("distance", "monochromator/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("energy", "monochromator/energy", NX_FLOAT, { - new h5_attr("NX_ENERGY", "keV", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("type", "monochromator/type", NXnote, { - new h5_attr("NX_class", "NXnote", NX_CHAR) - }), - - new h5_group("crystal_2", { - new h5_attr("NX_class", "NXcrystal", NX_CHAR), - - new h5_dataset("bragg_angle", "crystal_2/bragg_angle", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_ANGLE", "degrees", NX_CHAR) - }), - new h5_dataset("type", "crystal_2/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("temperature", "crystal_2/temperature", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("reflection", "crystal_2/reflection", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR), - new h5_attr("NX_UNITLESS", "", NX_CHAR) - }), - new h5_dataset("order_no", "crystal_2/order_no", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - new h5_dataset("usage", "crystal_2/usage", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("bend_x", "crystal_2/bend_x", NX_FLOAT, { - new h5_attr("NX_ANY", "", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("crystal_1", { - new h5_attr("NX_class", "NXcrystal", NX_CHAR), - - new h5_dataset("type", "crystal_1/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("temperature", "crystal_1/temperature", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("usage", "crystal_1/usage", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("bragg_angle", "crystal_1/bragg_angle", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_ANGLE", "degrees", NX_CHAR) - }), - new h5_dataset("order_no", "crystal_1/order_no", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - new h5_dataset("reflection", "crystal_1/reflection", NX_INT, { - new h5_attr("NX_UNITLESS", "", NX_CHAR), - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }) - }) - }), - - new h5_group("XBPM6", { - new h5_attr("NX_class", "NXdetector_group", NX_CHAR), - - new h5_dataset("group_index", "XBPM6/group_index", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - new h5_dataset("group_names", "XBPM6/group_names", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("group_parent", "XBPM6/group_parent", NX_INT, { - new h5_attr("NX_class", "NX_INT", NX_CHAR) - }), - - new h5_group("XBPM6_skew", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("data", "XBPM6_skew/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "XBPM6_skew/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("XBPM6", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("distance", "XBPM6/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("gain_setting", "XBPM6/gain_setting", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("calibration_date", "XBPM6/calibration_date", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("description", "XBPM6/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("count_time", "XBPM6/count_time", NX_NUMBER, { - new h5_attr("NX_TIME", "s", NX_CHAR), - new h5_attr("NX_class", "NX_NUMBER", NX_CHAR) - }), - new h5_dataset("type", "XBPM6/type", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("XBPM6_sum", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("description", "XBPM6_sum/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("data", "XBPM6_sum/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("saturation_value", "XBPM6_sum/saturation_value", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }), - - new h5_group("XBPM6_y", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("data", "XBPM6_y/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "XBPM6_y/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }), - - new h5_group("XBPM6_x", { - new h5_attr("NX_class", "NX_detector", NX_CHAR), - - new h5_dataset("description", "XBPM6_x/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("data", "XBPM6_x/data", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }) - }), - - new h5_group("slit_0", { - new h5_attr("NX_class", "NXslit", NX_CHAR), - - new h5_dataset("distance", "slit_0/distance", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("material", "slit_0/material", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("x_translation", "slit_0/x_translation", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR), - new h5_attr("NX_LENGTH", "mm", NX_CHAR) - }), - new h5_dataset("x_gap", "slit_0/x_gap", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "slit_0/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }) - }) - }), - - new h5_group("plottable_data", { - new h5_attr("NX_class", "NXdata", NX_CHAR) - }), - - new h5_group("sample", { - new h5_attr("NX_class", "NXsample", NX_CHAR), - - new h5_dataset("x_translation", "sample/x_translation", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("temperature_log", "sample/temperature_log", NX_FLOAT, { - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("description", "sample/description", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("name", "sample/name", NX_CHAR, { - new h5_attr("NX_class", "NX_CHAR", NX_CHAR) - }), - new h5_dataset("y_translation", "sample/y_translation", NX_FLOAT, { - new h5_attr("NX_LENGTH", "mm", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }), - new h5_dataset("aequatorial_angle", "sample/aequatorial_angle", NX_FLOAT, { - new h5_attr("NX_ANGLE", "deg", NX_CHAR), - new h5_attr("NX_class", "NX_FLOAT", NX_CHAR) - }) - }) - }); - - return format; + const h5_group& get_format_definition() const override { + return *file_format; } - map* get_default_values() const override { - auto default_values = new std::map, boost::any>( - { - {"filter_set/description", "The filter set consists of 4 linear stages, each with five filter positions. Additionally each one allows for an out position to allow no filtering."}, - {"XBPM4/calibration_date", "???"}, - {"crystal_2/type", "Si"}, - {"beam_stop_2/size_y", 2.25}, - {"source/name", "Swiss Light Source"}, - {"beam_stop_2/size_x", 5.0}, - {"slit_1/material", "OFHC Cu"}, - {"monochromator/type", "Double crystal fixed exit monochromator"}, - {"XBPM4_skew/description", "Normalized difference of counts between diagonal quadrants"}, - {"XBPM6/type", "???"}, - {"XBPM6/description", "Four quadrant x-ray beam position monitor"}, - {"slit_3/material", "Si"}, - {"XBPM5/group_index", 3}, - {"crystal_1/type", "Si"}, - {"insertion_device/length", 1820.0}, - {"XBPM5_skew/description", "Normalized difference of counts between diagonal quadrants"}, - {"XBPM5_y/description", "Normalized difference of counts between high and low quadrants"}, - {"source/sigma_x", 0.202}, - {"XBPM5/type", "???"}, - {"XBPM4_x/description", "Normalized difference of counts between left and right quadrants"}, - {"XBPM4/group_names", "XBPM4, XBPM4_sum, XBPM4_x, XBPM4_y, XBPM4_skew"}, - {"slit_2/description", "Slit 2, optics hutch"}, - {"mirror/substrate_material", "SiO2"}, - {"XBPM5/group_names", "XBPM5, XBPM5_sum, XBPM5_x, XBPM5_y, XBPM5_skew"}, - {"control/note", "monitor"}, - {"monochromator/wavelength_spread", 0.0001}, - {"XBPM6/calibration_date", "???"}, - {"source/divergence_x", 0.000135}, - {"XBPM4_y/description", "Normalized difference of counts between high and low quadrants"}, - {"XBPM6_sum/description", "Sum of counts for the four quadrants"}, - {"crystal_1/order_no", 1}, - {"slit_3/description", "Slit 3, experimental hutch, exposure box"}, - {"XBPM5_sum/description", "Sum of counts for the four quadrants"}, - {"insertion_device/k", 2.46}, - {"insertion_device/type", "undulator"}, - {"XBPM6/group_index", 4}, - {"entry/definition", "NXsas"}, - {"crystal_2/usage", "Bragg"}, - {"entry/end_time", "???"}, - {"XBPM6_skew/description", "Normalized difference of counts between diagonal quadrants"}, - {"XBPM6_y/description", "Normalized difference of counts between high and low quadrants"}, - {"crystal_2/order_no", 2}, - {"XBPM6_x/description", "Normalized difference of counts between left and right quadrants"}, - {"mirror/type", "single"}, - {"sample/aequatorial_angle", 1.0}, - {"XBPM6/group_names", "XBPM6, XBPM6_sum, XBPM6_x, XBPM6_y, XBPM6_skew"}, - {"slit_4/material", "Si"}, - {"beam_stop_1/description", "circular"}, - {"source/sigma_y", 0.018}, - {"XBPM5/description", "Four quadrant x-ray beam position monitor"}, - {"slit_2/material", "Ag"}, - {"XBPM4/distance", 0.0}, - {"beam_stop_1/size", 3.0}, - {"XBPM5_x/description", "Normalized difference of counts between left and right quadrants"}, - {"XBPM5/calibration_date", "???"}, - {"XBPM4/type", "???"}, - {"XBPM4_sum/description", "Sum of counts for the four quadrants"}, - {"slit_0/description", "Horizontal secondary source slit"}, - {"source/divergence_y", 2.5e-05}, - {"crystal_1/usage", "Bragg"}, - {"slit_4/description", "Slit 4, experimental hutch, exposure box"}, - {"control/mode", "Value from bpm4s"}, - {"XBPM4/description", "Four quadrant x-ray beam position monitor"}, - {"XBPM5/distance", 0.0}, - {"XBPM6/distance", 0.0}, - {"source/probe", "x-ray"}, - {"slit_1/description", "Slit 1, optics hutch"}, - {"instrument/name", "cSAXS beamline"}, - {"XBPM4/group_index", 2}, - {"mirror/description", "Grazing incidence mirror to reject high-harmonic wavelengths from the monochromator. There are three coating options available that are used depending on the X-ray energy, no coating (SiO2), rhodium (Rh) or platinum (Pt)."}, - {"slit_0/material", "OFHC Cu"}, - {"beam_stop_2/description", "rectangular"}, - {"source/type", "Synchrotron X-ray Source"}, - // TODO: This are temp for dataset arrays. Implement size based on type. - {"crystal_1/reflection", 1}, - {"crystal_2/reflection", 1}, - {"XBPM4/group_parent", 1}, - {"XBPM5/group_parent", 1}, - {"XBPM6/group_parent", 1}, - } - ); - - return default_values; + const map& get_default_values() const override { + return *default_values; } void add_calculated_values(map& values) const override { - map input_mapping = { {"source/distance", "input/samz"}, {"slit_0/distance", "input/samz"}, @@ -859,7 +940,7 @@ class NXmxFormat : public H5Format {"filter_set/attenuator_transmission", [](double x) -> double { return pow(10.0, x);}}, }; - for (auto pair : functions) { + for (const auto& pair : functions) { string input_name; try{ @@ -961,85 +1042,15 @@ class NXmxFormat : public H5Format {"samz", {"input/samz"}}, }; - for (auto input : input_mapping) { - for (auto destination_name : input.second) { + for (const auto& input : input_mapping) { + for (const auto& destination_name : input.second) { values[destination_name] = input_values.at(input.first); } } } - const std::map* get_input_value_type() const override { - auto input_value_types = new std::map({ - {"sl2wv", NX_FLOAT}, - {"sl0ch", NX_FLOAT}, - {"sl2wh", NX_FLOAT}, - {"temp_mono_cryst_1", NX_FLOAT}, - {"harmonic", NX_INT}, - {"mokev", NX_FLOAT}, - {"sl2cv", NX_FLOAT}, - {"bpm4_gain_setting", NX_FLOAT}, - {"mirror_coating", NX_CHAR}, - {"samx", NX_FLOAT}, - {"sample_name", NX_CHAR}, - {"bpm5y", NX_FLOAT}, - {"sl2ch", NX_FLOAT}, - {"curr", NX_FLOAT}, - {"bs2_status", NX_CHAR}, - {"bs2y", NX_FLOAT}, - {"diode", NX_FLOAT}, - {"samy", NX_FLOAT}, - {"sl4ch", NX_FLOAT}, - {"sl4wh", NX_FLOAT}, - {"temp_mono_cryst_2", NX_FLOAT}, - {"sl3wh", NX_FLOAT}, - {"mith", NX_FLOAT}, - {"bs1_status", NX_CHAR}, - {"bpm4s", NX_FLOAT}, - {"sl0wh", NX_FLOAT}, - {"bpm6z", NX_FLOAT}, - {"bs1y", NX_FLOAT}, - {"scan", NX_CHAR}, - {"bpm5_gain_setting", NX_FLOAT}, - {"bpm4z", NX_FLOAT}, - {"bpm4x", NX_FLOAT}, - {"date", NX_DATE_TIME}, - {"mibd", NX_FLOAT}, - {"temp", NX_FLOAT}, - {"idgap", NX_FLOAT}, - {"sl4cv", NX_FLOAT}, - {"sl1wv", NX_FLOAT}, - {"sl3wv", NX_FLOAT}, - {"sl1ch", NX_FLOAT}, - {"bs2x", NX_FLOAT}, - {"bpm6_gain_setting", NX_FLOAT}, - {"bpm4y", NX_FLOAT}, - {"bpm6s", NX_FLOAT}, - {"sample_description", NX_CHAR}, - {"bpm5z", NX_FLOAT}, - {"moth1", NX_FLOAT}, - {"sec", NX_NUMBER}, - {"sl3cv", NX_FLOAT}, - {"bs1x", NX_FLOAT}, - {"bpm6_saturation_value", NX_FLOAT}, - {"bpm5s", NX_FLOAT}, - {"mobd", NX_FLOAT}, - {"sl1wh", NX_FLOAT}, - {"sl4wv", NX_FLOAT}, - {"bs2_det_dist", NX_FLOAT}, - {"bpm5_saturation_value", NX_FLOAT}, - {"fil_comb_description", NX_CHAR}, - {"bpm5x", NX_FLOAT}, - {"bpm4_saturation_value", NX_FLOAT}, - {"bs1_det_dist", NX_FLOAT}, - {"sl3ch", NX_FLOAT}, - {"bpm6y", NX_FLOAT}, - {"sl1cv", NX_FLOAT}, - {"bpm6x", NX_FLOAT}, - {"ftrans", NX_FLOAT}, - {"samz", NX_FLOAT}, - }); - - return input_value_types; + const std::map& get_input_value_type() const override { + return *input_value_type; } }; \ No newline at end of file