Running DAQ Interface » History » Version 21
Running DAQ Interface¶
DAQ Interface is designed to be run, along with rest of the run control code, on lbnedaqtest01.fnal.gov . To obtain an account on this system, contact John Freeman, firstname.lastname@example.org . Once you have an account, you may do the following:
- Check out the run control software:
Create a new directory, cd into it, and execute
git clone ssh://email@example.com/cvs/projects/lbnerc
- Make sure you're on the feature/DAQInterface branch
cd into lbnerc/, and execute
git checkout feature/DAQInterface
- Set up the environment:
From the lbnerc/ directory, execute
source source_meThis will do two things: first, if it sees that the lbne-artdaq package isn't installed, it will install it. The lbne-artdaq installation will take around 10 minutes, and will take up about 3.3 Gb of space. There will be a prompt early in the download as to whether you want to continue; hit "y" to do so. "source_me" will search for the lbne-artdaq package in the directory /data/YOURUSERNAME/lbne-artdaq-base ; if it sees that /data/YOURUSERNAME doesn't exist, it will notify you and exit. Contact John Freeman (firstname.lastname@example.org) or someone else with root privileges on lbnedaqtest01 to create this directory for you. After installing lbne-artdaq, it then sets up the Python virtual environment needed by the LBNE RC code in the parent directory of lbnerc, in a directory call "env" (in other words, "env" and "lbnerc" are at the same level of the directory hierarchy on the system). If this is the first time you've set up the Python virtual environment, the process will take roughly two minutes. Note that while there will be a few error/warning messages displayed at different points of the setup, at the end you should see
Environment ready; consider running the unit tests via command nosetests
n.b. As of 7/8/14 if you run
nosetests4 of the 65 tests will fail; more than this, and there may be a problem which will affect the running of DAQInterface.
- Start LBNE run control:
lbnecontrol &. Note this won't work if lbnecontrol is already running; to find this out, run "
ps -A | grep lbnecontrol"
- Start DAQ Interface:
daqinterface -n daqint -r 5570 -c localhost -H localhost &. Like lbnerc, this also won't work if daqinterface is already running
- Take DAQ Interface through the standard transitions :
Fire up a new shell/terminal in which the artdaq processes are launched, and initialize them with FHiCL documents, by executing the following:
lbnecmd init daq
Start the toy fragment generator, which produces simulated CAEN board data, and plot the data using an Art module:
lbnecmd start daq
Pause it, ending the subrun but not the run:
lbnecmd pause daq
Resume DAQ running:
lbnecmd resume daq
Halt the running of the DAQ:
lbnecmd stop daq
Kill all the artdaq processes:
lbnecmd terminate daq
- If Problems Arise
As of this writing (7/8/14) there as not yet been extensive user feedback concerning DAQInterface; despite this, certain potential problems have been anticipated and are handled within DAQInterface. These problems include:
-An artdaq process returns an error state after a transition request, or an exception is thrown by the XML-RPC library during the request
-During periodic checks, one or more artdaq processes expected to exist are not found
In either case, an error is reported via 0MQ to run control, and the "Recover" transition is automatically triggered. This transition is a fairly blunt instrument: it will kill any remaining artdaq processes and return DAQInterface to its original state of "stopped" (i.e., one in which it requires the "init" transition before anything else is done).
In order to see this for yourself, you can deliberately sabotage one of the transitions. E.g., during the "init" transition, FHiCL documents located in /data/fcl/daqinterface are used to initialize the artdaq processes after these processes have been started. You can replace one of these filenames listed in the lbnerc/rc/control/daqinterface.py file with one of your own files intentionally designed to be improper FHiCL; this will then trigger a "recover" transition automatically when an "init" transition is requested. You can then use the "lbnecmd check" command to see for yourself that DAQ Interface has returned to its original state. Another thing to do is, after the init transition, once the artdaq process terminal pops up, close it -- this will terminate the artdaq processes, triggering a call to "Recover".
Please note that if you issue an "init" transition and then follow it with a "terminate" transition, you'll see an exception in the artdaq terminal window which looks like the snippet below; this is because statistics collection which occurs during termination will fail if no data's been collected, which is expected:
Tue Jul 08 14:16:33 -0500 2014: Time Summary: Tue Jul 08 14:16:33 -0500 2014: Min: 0 Tue Jul 08 14:16:33 -0500 2014: Max: 0 Tue Jul 08 14:16:33 -0500 2014: Avg: inf Tue Jul 08 14:16:33 -0500 2014: %MSG-s ArtException: Aggregator-lbnedaqtest01-5265 JobSetup Tue Jul 08 14:16:33 -0500 2014: cet::exception caught in art Tue Jul 08 14:16:33 -0500 2014: ---- DataCorruption BEGIN Tue Jul 08 14:16:33 -0500 2014: NetMonInputDetail: Could not receive message! Tue Jul 08 14:16:33 -0500 2014: ---- DataCorruption END Tue Jul 08 14:16:33 -0500 2014: %MSG Tue Jul 08 14:16:33 -0500 2014: %MSG-s ArtException: Aggregator-lbnedaqtest01-5266 JobSetup Tue Jul 08 14:16:33 -0500 2014: cet::exception caught in art Tue Jul 08 14:16:33 -0500 2014: ---- DataCorruption BEGIN Tue Jul 08 14:16:33 -0500 2014: NetMonInputDetail: Could not receive message! Tue Jul 08 14:16:33 -0500 2014: ---- DataCorruption END