mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-03 05:34:12 +02:00
State implementation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "FastH5Writer.hpp"
|
||||
#include <H5Cpp.h>
|
||||
|
||||
|
||||
template<>
|
||||
FastH5Writer<uint16_t>::FastH5Writer(
|
||||
@@ -8,16 +8,15 @@ FastH5Writer<uint16_t>::FastH5Writer(
|
||||
const uint16_t x_frame_size) :
|
||||
n_frames_per_file_(n_frames_per_file),
|
||||
y_frame_size_(y_frame_size),
|
||||
x_frame_size_(y_frame_size)
|
||||
x_frame_size_(y_frame_size),
|
||||
current_output_filename_(""),
|
||||
current_output_file_(),
|
||||
current_image_dataset_(),
|
||||
current_pulse_id_(0)
|
||||
{
|
||||
// // Each element in uint16_t has 2 bytes.
|
||||
// size_t n_bytes = 2 * y_frame_size * x_frame_size;
|
||||
auto file = H5::H5File(target_filename.c_str(), H5F_ACC_TRUNC);
|
||||
|
||||
|
||||
|
||||
|
||||
create_dataset("image", frame_size, n_frames_per_file, "uint16");
|
||||
// auto file = H5::H5File(target_filename.c_str(), H5F_ACC_TRUNC);
|
||||
}
|
||||
|
||||
template <class B>
|
||||
@@ -40,4 +39,16 @@ void FastH5Writer<B>::create_image_dataset()
|
||||
|
||||
current_image_dataset_ = current_output_file_.createDataSet(
|
||||
"image", dataset_data_type, dataspace, dataset_properties);
|
||||
}
|
||||
|
||||
template <class B>
|
||||
void FastH5Writer<B>::set_pulse_id(const uint64_t pulse_id)
|
||||
{
|
||||
current_pulse_id_ = pulse_id;
|
||||
}
|
||||
|
||||
template <class B>
|
||||
void FastH5Writer<B>::write_data(const char *buffer)
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user