From: Hadaq@styx Date: Wed, 9 Oct 2013 17:35:21 +0000 (+0200) Subject: latest version X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=3035e3104fe48f3fc846a8761aa24357a66ccc14;p=daqtools.git latest version --- diff --git a/users/cosy_test/config/cts.sh b/users/cosy_test/config/cts.sh index 829f1bb..d8a78b9 100755 --- a/users/cosy_test/config/cts.sh +++ b/users/cosy_test/config/cts.sh @@ -1,3 +1,5 @@ #!/bin/bash -echo "No CTS configuration" +echo "Doing CTS configuration" + +trbcmd w 0x8000 0xa137 0x000f4240 \ No newline at end of file diff --git a/users/cosy_test/config/gbe/register_configgbe_ip.db b/users/cosy_test/config/gbe/register_configgbe_ip.db index 19523da..2385588 100755 --- a/users/cosy_test/config/gbe/register_configgbe_ip.db +++ b/users/cosy_test/config/gbe/register_configgbe_ip.db @@ -34,6 +34,6 @@ 0x8000 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc350 0xdead8000 0x0230 0x0a9b3bd8 0xc350 0x0578 - 0x8800 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc351 0xdead8800 0x0230 0x0a9b3bd8 0xc351 0x0578 - 0x8900 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc352 0xdead8900 0x0230 0x0a9b3bd8 0xc352 0x0578 + 0x8800 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc358 0xdead8800 0x0230 0x0a9b3bd8 0xc358 0x0578 + 0x8900 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc359 0xdead8900 0x0230 0x0a9b3bd8 0xc359 0x0578 diff --git a/users/cosy_test/evtbuilder_start.sh b/users/cosy_test/evtbuilder_start.sh new file mode 100755 index 0000000..ee19838 --- /dev/null +++ b/users/cosy_test/evtbuilder_start.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +dest="/scratch/c/hldfiles" +sdest="/scratch/c/shldfiles" +pref="te" +sden=0 + +usage() { + echo "Usage: $0 [-d ] [-s ] [-p ] [-t] [-h]" + echo " -t -- scale down" + echo " Defaults:" + echo " -d=${dest}" + echo " -s=${sdest}" + echo " -p=${pref}" +} + +while getopts "d:s:p:th" opt; do + case "${opt}" in + t) + sden=1 + ;; + d) + dest=${OPTARG} + ;; + s) + sdest=${OPTARG} + ;; + p) + pref=${OPTARG} + ;; + h) + usage + ;; + *) + exit -1 + ;; + esac +done + +sdopts="--resdownscale 20 --resnumevents 2000 --respath ${sdest} --ressizelimit 80" +extraopts="" +[ ${sden} -eq 1 ] && extraopts="$sdopts" + +${HOME}/bin/evtbuilder_stop.sh + +source ${HOME}/bin/trbnet_env.sh + +exec uxterm -bg khaki -geometry 120x20+900+45 -e "/home/hadaq/bin/daq_evtbuild -m 3 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file ${extraopts}; read ; bash" & +pid=$! +echo $pid > ~/trbsoft/.daq_evtbuild.pid + +sleep 1 + +exec uxterm -bg tan -geometry 120x20+900+345 -e "/home/hadaq/bin/daq_netmem -m 3 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -q 32 -d 1 -S test ; read ; bash " & +pid=$! +echo $pid > ~/trbsoft/.daq_netmem.pid + +echo ${dest} > ${HOME}/trbsoft/.hldfilesdir +echo ${sdest} > ${HOME}/trbsoft/.shldfilesdir diff --git a/users/cosy_test/evtbuilder_stop.sh b/users/cosy_test/evtbuilder_stop.sh new file mode 100755 index 0000000..feebd43 --- /dev/null +++ b/users/cosy_test/evtbuilder_stop.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +killpid() { + local pidf=$1 + + [ -e $pidf ] && pidv=$(cat $pidf) +# echo "Found PID=$pidv" + + if [ -n "${pidv}" ]; then +# echo "Nice way with ps -fp" + + pidexists=$(ps -fp $pidv --no-headers | grep "daq_netmem\|daq_evtbuild" | wc -l) + + [ "${pidexists}" -ne 0 ] && kill -2 ${pidv} || echo "Doesn't exists!" + rm ${pidf} -v +# else +# echo "No PID file, kill by hand..." + fi +} + +pidf=${HOME}/trbsoft/.daq_evtbuild.pid +killpid $pidf + +pidf=${HOME}/trbsoft/.daq_netmem.pid +killpid $pidf +