mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-10 13:02:03 +02:00
bfaf7dd282
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.
29 lines
590 B
C++
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
|