mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-06-08 12:38:40 +02:00
Add dataset move logic to format
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
#include "../config.hpp"
|
||||
#include "../H5Format.hpp"
|
||||
|
||||
using namespace std;
|
||||
@@ -13,6 +14,7 @@ class NXmxFormat : public H5Format
|
||||
{
|
||||
shared_ptr<unordered_map<string, DATA_TYPE>> input_value_type = NULL;
|
||||
shared_ptr<unordered_map<string, boost::any>> default_values = NULL;
|
||||
shared_ptr<unordered_map<string, std::string>> dataset_move_mapping = NULL;
|
||||
shared_ptr<h5_group> file_format = NULL;
|
||||
|
||||
public:
|
||||
@@ -93,6 +95,11 @@ class NXmxFormat : public H5Format
|
||||
{"samz", NX_FLOAT},
|
||||
}));
|
||||
|
||||
dataset_move_mapping.reset(new std::unordered_map<string, string>(
|
||||
{
|
||||
{config::raw_image_dataset_name, "entry/plottable_data/image"},
|
||||
}));
|
||||
|
||||
// Default values used in the file format.
|
||||
default_values.reset(new std::unordered_map<string, boost::any>(
|
||||
{
|
||||
@@ -897,10 +904,6 @@ class NXmxFormat : public H5Format
|
||||
}));
|
||||
}
|
||||
|
||||
string get_frames_dataset_name() const override {
|
||||
return "entry/plottable_data/data";
|
||||
}
|
||||
|
||||
const h5_group& get_format_definition() const override {
|
||||
return *file_format;
|
||||
}
|
||||
@@ -1052,4 +1055,8 @@ class NXmxFormat : public H5Format
|
||||
return *input_value_type;
|
||||
}
|
||||
|
||||
const unordered_map<string, string>& get_dataset_move_mapping() const override {
|
||||
return *dataset_move_mapping;
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user