Made interface more simple for sf_live

This commit is contained in:
2020-05-01 13:05:37 +02:00
parent 0810b67f5a
commit b71a2af0ed
2 changed files with 19 additions and 4 deletions
+15 -2
View File
@@ -2,12 +2,23 @@
#define SF_DAQ_BUFFER_LIVEH5READER_HPP
#include <string>
#include <memory>
#include "jungfrau.hpp"
#include "buffer_config.hpp"
class LiveH5Reader {
struct LiveBufferMetadata {
uint64_t pulse_id[core_buffer::FILE_MOD];
uint64_t frame_index[core_buffer::FILE_MOD];
uint32_t daq_rec[core_buffer::FILE_MOD];
uint16_t n_received_packets[core_buffer::FILE_MOD];
};
const std::string current_filename_;
const uint16_t source_id_;
std::unique_ptr<LiveBufferMetadata> metadata_buffer_;
std::unique_ptr<uint16_t[]> data_buffer_;
public:
LiveH5Reader(
@@ -16,8 +27,10 @@ public:
const uint16_t source_id);
uint64_t get_latest_pulse_id();
ModuleFrame* read_frame_metadata(uint64_t pulse_id);
char* read_frame_data(uint64_t pulse_id);
void load_pulse_id(uint64_t pulse_id);
ModuleFrame* get_metadata();
char* get_data();
};