Files
sf_daq_buffer/jf-live-writer/include/BinaryReader.hpp
T
babic_a bfaf7dd282 Add BinaryReader for live writer
The binary reader reads 1 frame at a time from a module - the
difference being loading 1 image instead of 1 block of images.
This will allow to set the offset and pulse_id increment easily
without complicated internal buffer calculations.
2020-07-20 09:36:37 +02:00

29 lines
590 B
C++

#ifndef SF_DAQ_BUFFER_BINARYREADER_HPP
#define SF_DAQ_BUFFER_BINARYREADER_HPP
#include <formats.hpp>
class BinaryReader {
const std::string root_folder_;
const std::string device_name_;
std::string current_input_file_;
int input_file_fd_;
void open_file(const std::string& filename);
void close_current_file();
public:
BinaryReader(const std::string &root_folder,
const std::string &device_name);
~BinaryReader();
void get_frame(const uint64_t pulse_id, BufferBinaryFormat *buffer);
};
#endif //SF_DAQ_BUFFER_BINARYREADER_HPP