File writer and spot finding improvements
This commit is contained in:
20
writer/HDF5DataFilePluginResEstimation.cpp
Normal file
20
writer/HDF5DataFilePluginResEstimation.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (2019-2024) Paul Scherrer Institute
|
||||
|
||||
#include "HDF5DataFilePluginResEstimation.h"
|
||||
|
||||
void HDF5DataFilePluginResEstimation::OpenFile(HDF5File &data_file, const DataMessage &msg) {}
|
||||
|
||||
void HDF5DataFilePluginResEstimation::Write(const DataMessage &msg) {
|
||||
if (!msg.resolution_estimation)
|
||||
return;
|
||||
|
||||
if (msg.number >= res_estimation.size())
|
||||
res_estimation.resize(msg.number + 1);
|
||||
|
||||
res_estimation[msg.number] = msg.resolution_estimation.value();
|
||||
}
|
||||
|
||||
void HDF5DataFilePluginResEstimation::WriteFinal(HDF5File &data_file) {
|
||||
if (!res_estimation.empty())
|
||||
data_file.SaveVector("/entry/res_estimation", res_estimation);
|
||||
}
|
||||
Reference in New Issue
Block a user