mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-08-11 17:20:29 +02:00
Move raw_data to format destination
This commit is contained in:
+3
-1
@@ -294,7 +294,7 @@ void H5Format::write_format_data(H5::Group& file_node, h5_parent& format_node, s
|
||||
}
|
||||
}
|
||||
|
||||
void H5Format::write_format(H5::H5File& file, std::map<std::string, h5_value>& input_values){
|
||||
void H5Format::write_format(H5::H5File& file, std::map<std::string, h5_value>& input_values, string frames_dataset_name){
|
||||
|
||||
auto format = get_format_definition();
|
||||
auto values = get_default_values();
|
||||
@@ -303,4 +303,6 @@ void H5Format::write_format(H5::H5File& file, std::map<std::string, h5_value>& i
|
||||
add_calculated_values(*values);
|
||||
|
||||
write_format_data(file, *format, *values);
|
||||
|
||||
file.move("raw_data", frames_dataset_name.c_str());
|
||||
}
|
||||
+2
-1
@@ -85,7 +85,7 @@ namespace H5Format {
|
||||
boost::any get_value_from_reference(std::string& dataset_name, boost::any value_reference, std::map<std::string, boost::any>& values);
|
||||
|
||||
void write_format_data(H5::Group& file_node, h5_parent& format_node, std::map<std::string, h5_value>& values);
|
||||
void write_format(H5::H5File& file, std::map<std::string, h5_value>& input_values);
|
||||
void write_format(H5::H5File& file, std::map<std::string, h5_value>& input_values, std::string frames_dataset_name);
|
||||
};
|
||||
|
||||
// Move this somewhere else.
|
||||
@@ -94,5 +94,6 @@ std::map<std::string, boost::any>* get_default_values();
|
||||
h5_group* get_format_definition();
|
||||
void add_calculated_values(std::map<std::string, boost::any>& values);
|
||||
void add_input_values(std::map<std::string, boost::any>& values, std::map<std::string, boost::any>& input_values);
|
||||
std::string get_frames_dataset_name();
|
||||
|
||||
#endif
|
||||
@@ -20,7 +20,7 @@ namespace pt = boost::property_tree;
|
||||
|
||||
void write_h5(WriterManager *manager, RingBuffer *ring_buffer, string output_file)
|
||||
{
|
||||
H5Writer writer(output_file, "data");
|
||||
H5Writer writer(output_file, "raw_data");
|
||||
|
||||
// Run until the running flag is set or the ring_buffer is empty.
|
||||
while(manager->is_running() || !ring_buffer->is_empty()) {
|
||||
@@ -54,7 +54,7 @@ void write_h5(WriterManager *manager, RingBuffer *ring_buffer, string output_fil
|
||||
cout << "[h5_zmq_writer::write] Writing file format." << endl;
|
||||
#endif
|
||||
|
||||
H5Format::write_format(writer.get_h5_file(), manager->get_parameters());
|
||||
H5Format::write_format(writer.get_h5_file(), manager->get_parameters(), get_frames_dataset_name());
|
||||
}
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
string get_frames_dataset_name() {
|
||||
return "entry/plottable_data/data";
|
||||
}
|
||||
|
||||
h5_group* get_format_definition(){
|
||||
|
||||
auto format =
|
||||
|
||||
Reference in New Issue
Block a user