mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-02 09:44:17 +02:00
Write format only if file still open
This commit is contained in:
@@ -45,12 +45,14 @@ void write_h5(WriterManager *manager, RingBuffer *ring_buffer, string output_fil
|
||||
manager->written_frame(received_data.first.frame_index);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
cout << "[h5_zmq_writer::write] Writing file format." << endl;
|
||||
#endif
|
||||
|
||||
h5_utils::write_format(writer.get_h5_file(), manager->get_parameters());
|
||||
if (writer.is_file_open()) {
|
||||
#ifdef DEBUG_OUTPUT
|
||||
cout << "[h5_zmq_writer::write] Writing file format." << endl;
|
||||
#endif
|
||||
|
||||
h5_utils::write_format(writer.get_h5_file(), manager->get_parameters());
|
||||
}
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
cout << "[h5_zmq_writer::write] Closing file." << endl;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user