]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
slight improvement to eventbuilder start script for Frankfurt
authorJan Michel <j.michel@gsi.de>
Mon, 26 May 2014 15:29:44 +0000 (17:29 +0200)
committerJan Michel <j.michel@gsi.de>
Mon, 26 May 2014 15:30:01 +0000 (17:30 +0200)
users/frankfurt_test/evtbuilder_start.sh

index 66eda7d63e7ade5418c2fc4936e96755c97aff8d..ec2ced3dad976d929efd25f6aeee1dbf3f3b104a 100755 (executable)
@@ -6,6 +6,7 @@ tmpdir="/local/tmp/evtbuild"
 pref="te"
 sden=0
 
+
 usage() {
        echo "Usage: $0 [-d <hlddir>] [-s <shlddir>] [-p <te|be|ca>] [-t] [-h]"
        echo "  -t -- scale down"
@@ -15,7 +16,7 @@ usage() {
        echo "  -p=${pref}"
 }
 
-while getopts "d:s:p:th" opt; do
+while getopts "n:d:s:p:th" opt; do
        case "${opt}" in
                t)
                        sden=1
@@ -23,6 +24,9 @@ while getopts "d:s:p:th" opt; do
                d)
                        dest=${OPTARG}
                        ;;
+               n)
+                       num=${OPTARG}
+                       ;;
                s)
                        sdest=${OPTARG}
                        ;;
@@ -47,17 +51,26 @@ extraopts="--online"
 cd $tmpdir
 
 
-#exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_evtbuild -m 1 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file 
-exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_evtbuild -m 2 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file \
-${extraopts}; 
-read; bash" &
+if [ $num = 1 ]; then
+  exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_evtbuild -m 1 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file; read; bash" &
+fi
+if [ $num = 2 ]; then
+  exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_evtbuild -m 2 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file \
+${extraopts}; read; bash" &
+fi
+
 pid=$!
 echo $pid > $tmpdir/.daq_evtbuild.pid
 
 sleep 1
 
-#exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_netmem -m 1 -i UDP:0.0.0.0:50000 -q 32 -d 1 -S test ;  " &
-exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_netmem -m 2 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50003 -q 32 -d 1 -S test ;  " &
+if [ $num = 1 ]; then
+  exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_netmem -m 1 -i UDP:0.0.0.0:50000 -q 32 -d 1 -S test ;  " &
+fi
+
+if [ $num = 2 ]; then
+  exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/d/jspc22/trb/git/daqdata/hadaq/daq_netmem -m 2 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50003 -q 32 -d 1 -S test ;  " &
+fi
 pid=$!
 echo $pid > $tmpdir/.daq_netmem.pid