diff --git a/core-buffer/include/FastH5Writer.hpp b/core-buffer/include/FastH5Writer.hpp index 6db76f2..67249ba 100644 --- a/core-buffer/include/FastH5Writer.hpp +++ b/core-buffer/include/FastH5Writer.hpp @@ -3,6 +3,8 @@ #include #include +#include +#include template class FastH5Writer { @@ -13,8 +15,10 @@ class FastH5Writer { const uint16_t y_frame_size_; const uint16_t x_frame_size_; - std::string current_output_file_; + std::string current_output_filename_; + H5::H5File current_output_file_; H5::DataSet current_image_dataset_; + uint64_t current_pulse_id_; void create_image_dataset(); diff --git a/core-buffer/src/FastH5Writer.cpp b/core-buffer/src/FastH5Writer.cpp index 0ffe01a..4045ca2 100644 --- a/core-buffer/src/FastH5Writer.cpp +++ b/core-buffer/src/FastH5Writer.cpp @@ -1,5 +1,5 @@ #include "FastH5Writer.hpp" -#include + template<> FastH5Writer::FastH5Writer( @@ -8,16 +8,15 @@ FastH5Writer::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 @@ -40,4 +39,16 @@ void FastH5Writer::create_image_dataset() current_image_dataset_ = current_output_file_.createDataSet( "image", dataset_data_type, dataspace, dataset_properties); +} + +template +void FastH5Writer::set_pulse_id(const uint64_t pulse_id) +{ + current_pulse_id_ = pulse_id; +} + +template +void FastH5Writer::write_data(const char *buffer) +{ + } \ No newline at end of file