Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/DataWriterModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ DataWriterModule::receive_trigger_record(std::unique_ptr<daqdataformats::Trigger
void
DataWriterModule::do_work(std::atomic<bool>& running_flag)
{
while (running_flag.load()) {
// 27-Jan-2026, KAB: we want this code to drain all pending TriggerRecords from
// the input queue at end-run time. So, we check if there is data in the queue
// and continue the while loop if there is any.
while (running_flag.load() || m_tr_receiver->data_pending()) {
try {
std::unique_ptr<daqdataformats::TriggerRecord> tr = m_tr_receiver->receive(std::chrono::milliseconds(10));
receive_trigger_record(tr);
Expand Down
Loading