Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  01 Jun 2026, Yiwen Yang, Suggestion, Multithreaded deferred transitions 
    Reply  11 Jun 2026, Stefan Ritt, Suggestion, Multithreaded deferred transitions 
       Reply  25 Jun 2026, Konstantin Olchanski, Suggestion, Multithreaded deferred transitions 
          Reply  25 Jun 2026, Yiwen Yang, Suggestion, Multithreaded deferred transitions 
             Reply  08 Jul 2026, Konstantin Olchanski, Suggestion, Multithreaded deferred transitions 
Message ID: 3244     Entry time: 08 Jul 2026     In reply to: 3237
Author: Konstantin Olchanski 
Topic: Suggestion 
Subject: Multithreaded deferred transitions 
> Deferred transition is registered by the FPN00

FPN00, yes, this rings a bell.

> (main clock) process to make sure the logger has finished logging all events before continuing to stop readout
> of other frontends. There is also a timeout, in case sometimes an event goes missing, to proceed with the run
> stop without getting stuck waiting for the logger.

yes, that's right, if trigger control and run control are in the same frontend, you run into this trouble:

user pushes run stop button
you get the run stop callback
you stop the trigger
but have to wait for all the data to flush down the pipes all the way to mlogger
but cannot wait, must return from the callback otherwise run transition is stuck

if trigger control and run control are in different frontends, things are simpler:

user pushes run stop botton
trigger control frontend disables the trigger, returns without waiting for anything
data frontend (i.e. FGD, TPC), flush all the hardware FIFOs, etc to MIDAS SYSTEM buffer (trigger is already 
disabled, there is no new data)
mlogger flushes SYSTEM buffer to disk
run control frontend reports successful run stop to the run database (and whatever else).

> Interestingly, I just checked and this feature is
> disabled in the FGD ODB, but it is enabled in the TPC ODB.

I do not have access to the current code, but I can check what I have,
and I am pretty sure it did not have any deferred transitions. Maybe
it was added after my time.

K.O.
ELOG V3.1.6-083448f7