Project

General

Profile

Feature #19904

Support subrun rollovers in artdaq v3

Added by Eric Flumerfelt over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Additional Functionality
Target version:
Start date:
05/08/2018
Due date:
% Done:

0%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

LArIAT has expressed interest in being able to change the subrun number from within artdaq. We have provided two mechanisms for this:

1. A "rollover_subrun" XMLRPC command, which takes the event number of the first event in the new subrun as its parameter. This command must be sent to all EventBuilders before the target event number is reached to ensure full synchronization.

2. Using the following code in one Fragment Generator:

if (rollover_subrun_interval_ > 0 && ev_counter() % rollover_subrun_interval_ == 0 && fragment_id() == 0)
        {
                artdaq::FragmentPtr endOfSubrunFrag(new artdaq::Fragment(static_cast<size_t>(ceil(sizeof(my_rank) / static_cast<double>(sizeof(artdaq::Fragment::value_type))))));
                endOfSubrunFrag->setSystemType(artdaq::Fragment::EndOfSubrunFragmentType);
                endOfSubrunFrag->setSequenceID(ev_counter());
                *endOfSubrunFrag->dataBegin() = my_rank;
                frags.emplace_back(std::move(endOfSubrunFrag));
        }

If events are being released to art out-of-order in the DataLogger, there may be a case where art closes the old subrun file, opens a new subrun file, then upon receiving an event from the previous subrun, closes the new file, opens a second file for the old subrun, writes the event, closes that file and opens a second file in the new subrun. This should only affect systems running at high rates, and the files can be merged offline (or by a nearline process configured to look for this pattern of behavior".


Related issues

Is duplicate of artdaq - Feature #15494: Remove pause-and-resume, replace with "rollover subrun"Closed02/08/2017

History

#1 Updated by Eric Flumerfelt 11 months ago

  • Is duplicate of Feature #15494: Remove pause-and-resume, replace with "rollover subrun" added


Also available in: Atom PDF