Project

General

Profile

Running DAQ Interface » History » Version 7

Version 6 (John Freeman, 06/12/2014 03:56 PM) → Version 7/223 (John Freeman, 06/25/2014 01:32 PM)

h1. 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, jcfree@fnal.gov . Once you have an account, you may do the following:

* *Check out the run control software*:

Simply execute <pre>git clone ssh://p-lbnerc@cdcvs.fnal.gov/cvs/projects/lbnerc</pre>

* *Make sure you're on the feature/DAQInterface branch*
cd into lbnerc/, and execute
<pre>git checkout feature/DAQInterface </pre>

* *Set up the environment*:
From the lbnerc/ directory, execute <pre>source source_me</pre> This 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 5 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 someone with root privileges to create this directory for you. After installing lbne-artdaq, it then sets set 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 environment, the entire 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 <pre>Environment ready; consider running the unit tests via command nosetests</pre>

* *Start LBNE run control*: <pre> lbnecontrol & </pre>. Note this won't work if lbnecontrol is already running.

* *Start DAQ Interface*: <pre> daqinterface -n daqint -r 5570 -c localhost -H localhost & </pre> . 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:
<pre>
lbnecmd init daq
</pre>

Start the toy fragment generator, which produces simulated CAEN board data, and plot the data using an Art module:
<pre>
lbnecmd start daq
</pre>

Pause it, ending the subrun but not the run:
<pre>
lbnecmd pause daq
</pre>

Resume DAQ running:
<pre>
lbnecmd resume daq
</pre>

Halt the running of the DAQ:
<pre>
lbnecmd stop daq
</pre>

Kill all the artdaq processes:
<pre>
lbnecmd terminate daq
</pre>

If anything goes wrong during a transition (specifically meaning, any of the artdaq processes controlled by DAQInterface fail to return "Success" after a transition is requested), then the "Recover" transition is automatically triggered. As of this writing (6/12/14), this transition is a fairly blunt instrument: it will kill the artdaq processes and return DAQInterface to its original state (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/jcfree/build_lbne-artdaq 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.