DUNE-DAQ / iomanager

Package providing a unified API
0 stars 0 forks source link

Drain remaining messages in callback before exiting. #22

Closed eflumerf closed 2 years ago

bieryAtFnal commented 2 years ago

This change helps avoid stale TriggerRecords between the TriggerRecordBuilder and the DataWriter. (It may also help other cases, but I haven't explicitly tested that.)

For the TRB-> DataWriter case, I used the following confgen command to test the code before and after the change:

daqconf_multiru_gen -t 5.0 --use-fake-data-producers -d $PWD/frames.bin -o <a slow disk location> -s 10 -n 5 -b 100000 -a 100000 mdapp_fdp

and the following nanorc command:

runbase=100; runduration=35; waitAfterStop=2; let R1=${runbase}+1; let R2=${runbase}+2; nanorc mdapp_fdp/ boot ${USER}-test init conf start ${R1} wait ${runduration} stop wait ${waitAfterStop} start ${R2} wait ${runduration} stop wait ${waitAfterStop} scrap terminate

To check for errors, I used the dfmodules:kbiery/DataWriterInvalidRunCheck branch and the following command:

egrep 'ERROR|WARNING' log* | grep DataWriter

NB that I included the appfwk, ipm, and networkmanager repos in my software area, along with the iomanager repo.