abort BOF in one FE does not abort BOF of other FEs

Issue #219 resolved
Ivo Schulthess created an issue

When two frontends are running and the first of them returns an error in the begin_of_run sequence, because e.g. some equipment is not at its target value, the other frontend never receives this abort. Even though the second frontend should only run on RO_RUNNING, it continues to acquire data. In the transition page only the logger receives STARTABORT and cleans up, not the frontends.

The screenshot shows the Midas transition page where Detector FE returned the error at begin_of_run, to logger aborted at start but the trigger FE is still taking data.

Comments (6)

  1. dd1

    Yes. For your frontend to receive the STARTABORT transition, you need to register for it. Look how mfe.c registers for the begin-of-run transition and do the same for the STARTABORT transition. You can also look at mlogger.cxx for an example of how to do this. K.O.

  2. Ivo Schulthess reporter

    Thanks for the fast reply. I implemented this to properly abort the FE and it works fine. Nevertheless, I wonder why the FE stills sees the state RO_RUNNING, because the run should be aborted. Shouldn't the read_trigger_event stop to trigger anyway?

  3. dd1

    the mfe.c frontend did not handle STARTABORT for historical reasons. the new tmfe c++ frontend does not handle it either, perhaps I should add it. K.O.

  4. dd1

    both frontend frameworks can handle TR_STARTABORT: mfe.c to receive STARTABORT transitions, register a handler; tmfe c++ frontend, to receive STARTABORT transitions, call mfe->RegisterTransitionStartAbort() and provide the HandleStartAbortRun() RPC handler. K.O.

  5. Stefan Ritt

    Besides the TR_STARTABORT, there is also the option of defining a certain sequence between the frontends. With the function

    cm_set_transition_sequence()

    you can set the order in which frontends are contacted for transitions. So if you set a smaller sequence number for your critical frontend, the it will be contacted first. Only if it succeeds, the other frontend will be contacted for the start transition. So if the first one fails, the others will never see a start transition.

    Stefan

  6. Log in to comment