Add partial implementation of LiveH5Reader

This commit is contained in:
2020-05-01 13:56:24 +02:00
parent 8cf8d3e7d2
commit 6253e53a19
2 changed files with 113 additions and 0 deletions
+16
View File
@@ -5,6 +5,7 @@
#include <memory>
#include "jungfrau.hpp"
#include "buffer_config.hpp"
#include <H5Cpp.h>
class LiveH5Reader {
@@ -14,17 +15,32 @@ class LiveH5Reader {
std::unique_ptr<uint64_t[]> pulse_id_buffer_;
std::unique_ptr<uint16_t[]> data_buffer_;
uint64_t current_file_max_pulse_id_;
H5::H5File file_;
H5::DataSet image_dataset_;
H5::DataSet pulse_id_dataset_;
H5::DataSet frame_index_dataset_;
H5::DataSet daq_rec_dataset_;
H5::DataSet n_received_packets_dataset_;
void open_file();
public:
LiveH5Reader(
const std::string& device,
const std::string& channel_name,
const uint16_t source_id);
~LiveH5Reader();
uint64_t get_latest_pulse_id();
void load_pulse_id(uint64_t pulse_id);
ModuleFrame get_metadata();
char* get_data();
void close_file();
};