Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-02 08:21:08

0001 #! /bin/sh
0002 
0003 #
0004 # mlp -- this is the rcdaq setup you can use to run the
0005 #        tutorials in the pmonitor manual. 
0006 #
0007 
0008 # we need the $0 as absolute path 
0009 D=`dirname "$0"`
0010 B=`basename "$0"`
0011 MYSELF="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
0012 
0013 # we figure out if a server is already running
0014 if ! rcdaq_client daq_status > /dev/null 2>&1 ; then
0015 
0016     echo "No rcdaq_server running, starting... log goes to $HOME/rcdaq.log"
0017     rcdaq_server > $HOME/rcdaq.log 2>&1 &
0018     sleep 2
0019 
0020 fi
0021 
0022 rcdaq_client load librcdaqplugin_gauss.so
0023 
0024 rcdaq_client daq_clear_readlist
0025 
0026 # we add this very file to the begin-run event
0027 rcdaq_client create_device device_file 9 900 "$MYSELF"
0028 
0029 # make the gauss device, and trigger-enable it
0030 rcdaq_client create_device device_gauss -- 1 1003 1
0031 
0032 # we add some artificial deadtime to slow down a bit
0033 rcdaq_client create_device device_deadtime 1 0 5000
0034