Running DAQ Interface » History » Version 14

John Freeman, 06/26/2014 12:41 PM

1 1 John Freeman
h1. Running DAQ Interface
2 1 John Freeman
3 1 John Freeman
DAQ Interface is designed to be run, along with rest of the run control code, on . To obtain an account on this system, contact John Freeman, . Once you have an account, you may do the following:
4 1 John Freeman
5 1 John Freeman
* *Check out the run control software*:
6 1 John Freeman
7 12 John Freeman
 Create a new directory, cd into it, and execute <pre>git clone ssh://</pre>
8 1 John Freeman
9 2 John Freeman
* *Make sure you're on the feature/DAQInterface branch*
10 3 John Freeman
cd into lbnerc/, and execute
11 2 John Freeman
<pre>git checkout feature/DAQInterface </pre>
12 2 John Freeman
13 1 John Freeman
* *Set up the environment*: 
14 10 John Freeman
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 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 ( 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 <pre>Environment ready; consider running the unit tests via command nosetests</pre>
15 13 John Freeman
n.b. As of 6/26/14 if you run <code>nosetests</code> a handful of the tests will fail; this is expected. If more than ten fail, then this is a problem. 
16 13 John Freeman
17 1 John Freeman
* *Start LBNE run control*: <pre> lbnecontrol & </pre>. Note this won't work if lbnecontrol is already running. 
18 1 John Freeman
19 1 John Freeman
* *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
20 1 John Freeman
21 1 John Freeman
* *Take DAQ Interface through the standard transitions* : 
22 1 John Freeman
23 4 John Freeman
Fire up a new shell/terminal in which the artdaq processes are launched, and initialize them with FHiCL documents:
24 1 John Freeman
25 1 John Freeman
lbnecmd init daq
26 1 John Freeman
27 1 John Freeman
28 1 John Freeman
Start the toy fragment generator, which produces simulated CAEN board data, and plot the data using an Art module:
29 1 John Freeman
30 1 John Freeman
lbnecmd start daq
31 1 John Freeman
32 1 John Freeman
33 4 John Freeman
Pause it, ending the subrun but not the run:
34 4 John Freeman
35 4 John Freeman
lbnecmd pause daq
36 4 John Freeman
37 4 John Freeman
38 4 John Freeman
Resume DAQ running:
39 4 John Freeman
40 4 John Freeman
lbnecmd resume daq
41 4 John Freeman
42 4 John Freeman
43 1 John Freeman
Halt the running of the DAQ:
44 1 John Freeman
45 1 John Freeman
lbnecmd stop daq
46 1 John Freeman
47 1 John Freeman
48 1 John Freeman
Kill all the artdaq processes:
49 1 John Freeman
50 1 John Freeman
lbnecmd terminate daq
51 1 John Freeman
52 4 John Freeman
53 6 John Freeman
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). 
54 4 John Freeman
55 11 John Freeman
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/ 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.