]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
latest version
authorHadaq@styx <hadaq@styx>
Wed, 9 Oct 2013 17:35:21 +0000 (19:35 +0200)
committerHadaq@styx <hadaq@styx>
Wed, 9 Oct 2013 17:35:21 +0000 (19:35 +0200)
users/cosy_test/config/cts.sh
users/cosy_test/config/gbe/register_configgbe_ip.db
users/cosy_test/evtbuilder_start.sh [new file with mode: 0755]
users/cosy_test/evtbuilder_stop.sh [new file with mode: 0755]

index 829f1bb75a41956989ebff88f5bb396e544da737..d8a78b98e86d0e308f39d5cf97b2e741219f5186 100755 (executable)
@@ -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
index 19523da3760baf008fee519a1fb79567862482d7..2385588d284dc168b1d08bba5bf9b7430fcff666 100755 (executable)
@@ -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 (executable)
index 0000000..ee19838
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+dest="/scratch/c/hldfiles"
+sdest="/scratch/c/shldfiles"
+pref="te"
+sden=0
+
+usage() {
+       echo "Usage: $0 [-d <hlddir>] [-s <shlddir>] [-p <te|be|ca>] [-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 (executable)
index 0000000..feebd43
--- /dev/null
@@ -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
+