--- /dev/null
+#!/bin/bash
+
+dest="/data/startdet"
+sdest="/data/startdet"
+tmpdir="/data/tmp/"
+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="--online"
+[ ${sden} -eq 1 ] && extraopts="$sdopts"
+
+
+[ ! -e $tmpdir ] && mkdir -p $tmpdir
+cd $tmpdir
+
+
+#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
+exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/home/hadaq/bin/daq_evtbuild -m 1 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file
+${extraopts};
+read; bash" &
+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 2 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50002 -q 32 -d 1 -S test ; " &
+exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/home/hadaq/bin/daq_netmem -m 1 -i UDP:0.0.0.0:50000 -q 32 -d 1 -S test ; " &
+pid=$!
+echo $pid > $tmpdir/.daq_netmem.pid
+
+echo ${dest} > $tmpdir/.hldfilesdir
+echo ${sdest} > $tmpdir/.shldfilesdir
# SubEvtId SubEvtDec QueDec PackSize FrameSize UseGbE UseTrbNet MultiQueue Trig. Num. MinEvtSize
# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 #
###################################################################################################################################################
- 0x89F0 0 0x8000 0x00020001 0x00030062 0xFDE8 0x578 1 0
-0 0xffffff 0x7
+ 0x8000 0 0x88f0 0x00020001 0x00030062 0xFDE8 0x578 1 0 0 0xffffff 0x7
# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 #
########################################################################################################################################
- 0x89f0 0 0xf4d7ba4c 0xbc5f 0xc0a8648a 0xc350 0xdead89f0 0x0230 0xc0a86630 0xc350 0x0578
+ 0x8000 0 0xf4d7ba4c 0xbc5f 0xc0a8648a 0xc350 0xdead88f0 0x0230 0xc0a86630 0xc350 0x0578
trbcmd reset
echo "addresses"
-trbcmd s 0x1c0000039018f128 0x05 0x89f0
-trbcmd s 0x7d000003901c6b28 0x00 0x88f0
-trbcmd s 0x630000039018ee28 0x01 0x88f1
-trbcmd s 0xf000000390074a28 0x02 0x88f2
-trbcmd s 0x1d00000390077a28 0x03 0x88f3
+trbcmd s 0x1c0000039018f128 0x05 0x8000
+trbcmd s 0x7d000003901c6b28 0x00 0x50f0
+trbcmd s 0x630000039018ee28 0x01 0x50f1
+trbcmd s 0xf000000390074a28 0x02 0x50f2
+trbcmd s 0x1d00000390077a28 0x03 0x50f3
echo "Hubs"
trbcmd w 0xfffe 0xc5 0x50ff
-trbcmd w 0xfc00 0xc5 0x50ff
-
-trbcmd w 0x8000 0xc0 0x0fef
-trbcmd w 0x8000 0xc1 0x0fef
../../tools/loadregisterdb.pl register_configgbe.db
../../tools/loadregisterdb.pl register_configgbe_ip.db
#echo "cts"
-#trbcmd w 0x8000 0xa137 1000000
+trbcmd w 0x8000 0xa137 1000000
#echo "tdc"
-trbcmd w 0xfe48 0xc801 0x000f0000
-#trbcmd w 0x8000 0xc801 0x000f0000
-
-trbcmd w 0xfe48 0xc804 0x00000040
-#trbcmd w 0x8000 0xc804 0x00000010
+trbcmd w 0xfe4e 0xc801 0x000f0000
+trbcmd w 0x8000 0xc801 0x000f0000
+trbcmd w 0xfe4e 0xc804 0x00000040
+trbcmd w 0x8000 0xc804 0x00000010
+echo "Loading thresholds"
+../../tools/dac_program.pl DAC_nino.db