mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-03 23:34:14 +02:00
Internalize file closing
This commit is contained in:
@@ -19,6 +19,8 @@ class JFH5Writer {
|
||||
|
||||
H5::DataSet image_dataset_;
|
||||
|
||||
void close_file();
|
||||
|
||||
public:
|
||||
JFH5Writer(const std::string& output_file,
|
||||
const uint64_t start_pulse_id,
|
||||
@@ -26,7 +28,7 @@ public:
|
||||
const size_t n_modules);
|
||||
~JFH5Writer();
|
||||
void write(const ImageMetadataBlock* metadata, const char* data);
|
||||
void close_file();
|
||||
|
||||
|
||||
uint64_t* b_pulse_id_;
|
||||
uint64_t* b_frame_index_;
|
||||
|
||||
@@ -143,8 +143,6 @@ int main (int argc, char *argv[])
|
||||
cout << write_us_duration / BUFFER_BLOCK_SIZE << endl;
|
||||
}
|
||||
|
||||
writer.close_file();
|
||||
|
||||
for (auto& reading_thread :reading_threads) {
|
||||
if (reading_thread.joinable()) {
|
||||
reading_thread.join();
|
||||
|
||||
Reference in New Issue
Block a user