mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-08 11:32:03 +02:00
Add partial implementation of LiveH5Reader
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user