Running the DAQ in Playback mode¶
When no hardware is available, it's still possible to send entire 35ton events through the DAQ system as if they were being sent from upstream hardware. The way this is done is by using either the "playback" or "playback_noganglia" configurations, where the former is intended for use on lbne35t-gateway01 and the latter for use on other hosts (which may not have ganglia installed). The basic idea is that the Playback fragment generator is fed a list of output *.root files produced during actual running of the 35ton hardware; it then sequentially steps through the files, going through the assembled events, extracting the relevant fragments, and then sending them downstream as if they'd been sent from hardware. For example, if the rce00 component is selected for the playback configuration, the Playback fragment generator will simply extract all fragments from the events with fragment ID 100 (the fragment ID used for rce00) and send them downstream.
Using the playback configurations is very similar to using any other configuration when running the DAQ, with a couple of caveats. All fragment generators use the parameter "input_file_list" in playback/playback.fcl or playback_noganglia/playback.fcl to determine the list of *.root files to process. By default as of this writing (Jun-6-2016) this list is set to /data/lbnedaq/scratch/jcfree/input_lists_for_playback/input_file_list.txt; you'll want to change this to a file in your own area so you can edit it. The format of this file is simply the full path of a *.root file on each line, e.g.:
Note that if a requested component's fragments aren't found in the file (e.g., if you tried running on ssp03 with the root files listed above), an error message like the following will be issued, and the DAQ will put itself into the stopped state:
Error / getNext 06-Jun-2016 17:54:02 CDT lbnedaq1 (10.226.8.18) BoardReaderMain (48540) / UDPMessage:406 BoardReader-lbnedaq1-5209 / BoardReader-lbnedaq1-5209 / MF-online cet::exception caught: ---- Playback BEGIN Unable to find branch in "/data/lbnedaq/scratch/jcfree/input_datafiles_for_playback/lbne_r018798_sr01_20160601T211818.root" containing fragment(s) with requested fragment ID #2 ---- Playback END
To determine which components were used for a given run, you can look in the run records directory for the metadata file for that run.
Assuming all needed components were in the files listed, when processing is finished, you'll see something like the following:
Info / Playback 06-Jun-2016 17:46:49 CDT lbnedaq1 (10.226.8.18) BoardReaderMain (7044) / UDPMessage:364 BoardReader-lbnedaq1-5311 / BoardReader-lbnedaq1-5311 / MF-online Finished processing all 2 files listed in /data/lbnedaq/scratch/jcfree/input_lists_for_playback/input_file_list.txt; you can now issue the stop transition to the DAQ
And at this point, you can issue "stop" and then "terminate" to the DAQ.
Other potential issues: if, during the processing of a file, an expected fragment isn't found, then a warning similar to the following will appear:
Warning / Playback 06-Jun-2016 17:46:25 CDT lbnedaq3 (10.226.8.23) BoardReaderMain (15481) / UDPMessage:346 BoardReader-lbnedaq3-5314 / BoardReader-lbnedaq3-5314 / MF-online Unable to find fragment with fragment ID 109 in entry 5399 of branch artdaq::Fragments_daq_TPC_DAQ.obj_ in file
This can happen if, e.g., the output *.root file being used as input contained incomplete events.