mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-26 11:10:45 +02:00
Make file operations private on BinaryWriter
This commit is contained in:
@@ -8,21 +8,24 @@ class BinaryWriter {
|
||||
|
||||
const std::string device_name_;
|
||||
const std::string root_folder_;
|
||||
const std::string latest_filename_;
|
||||
std::string latest_filename_;
|
||||
|
||||
std::string current_output_filename_;
|
||||
int output_file_fd_;
|
||||
|
||||
void open_file(const std::string& filename);
|
||||
void close_current_file();
|
||||
|
||||
|
||||
public:
|
||||
BinaryWriter(
|
||||
const std::string& device_name,
|
||||
const std::string& root_folder);
|
||||
|
||||
virtual ~BinaryWriter();
|
||||
|
||||
void write(const uint64_t pulse_id, const JFFileFormat* buffer);
|
||||
|
||||
void open_file(const std::string& filename);
|
||||
void close_current_file();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ BinaryWriter::BinaryWriter(
|
||||
#endif
|
||||
}
|
||||
|
||||
BinaryWriter::~BinaryWriter()
|
||||
{
|
||||
close_current_file();
|
||||
}
|
||||
|
||||
void BinaryWriter::write(uint64_t pulse_id, const JFFileFormat* buffer)
|
||||
{
|
||||
auto current_frame_file =
|
||||
|
||||
Reference in New Issue
Block a user