forked from sPHENIX-Collaboration/rcdaq
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup_pmonitor_tutorial.sh
More file actions
34 lines (23 loc) · 867 Bytes
/
setup_pmonitor_tutorial.sh
File metadata and controls
34 lines (23 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh
#
# mlp -- this is the rcdaq setup you can use to run the
# tutorials in the pmonitor manual.
#
# we need the $0 as absolute path
D=`dirname "$0"`
B=`basename "$0"`
MYSELF="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
# we figure out if a server is already running
if ! rcdaq_client daq_status > /dev/null 2>&1 ; then
echo "No rcdaq_server running, starting... log goes to $HOME/rcdaq.log"
rcdaq_server > $HOME/rcdaq.log 2>&1 &
sleep 2
fi
rcdaq_client load librcdaqplugin_gauss.so
rcdaq_client daq_clear_readlist
# we add this very file to the begin-run event
rcdaq_client create_device device_file 9 900 "$MYSELF"
# make the gauss device, and trigger-enable it
rcdaq_client create_device device_gauss -- 1 1003 1
# we add some artificial deadtime to slow down a bit
rcdaq_client create_device device_deadtime 1 0 5000