mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-11-25 15:57:55 +01:00
Buffer file corruption detection
This commit is contained in:
1 parent
98a243e7f1
commit
df62017346
1 file changed
+4
@@ -103,4 +103,8 @@ void ReplayH5Reader::get_buffer(
|
||||
|
||||
metadata = m_buffer_ + buffer_index;
|
||||
data = f_buffer_ + (buffer_index * MODULE_N_BYTES);
|
||||
|
||||
if (metadata->pulse_id != 0 && metadata->pulse_id != pulse_id) {
|
||||
throw runtime_error("Corrupted buffer file.");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user