echo "Programming FPGAs"
#Start
-../../../tools/command_client.pl -e etraxp129 -c "jam_trbv2 --trb -aRUN_XILINX_PROC /home/hadaq/tof/fpga/20101110_tof_a.stapl" &
+../../../tools/command_client.pl -e etraxp129 -c "jam_trbv2 --trb -aRUN_XILINX_PROC /home/hadaq/tof/fpga/20120305_tof.stapl " &
#Hub
../../../tools/command_client.pl -e etraxp022 -c "jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga1_full_20110517.stp"
dest="/scratch/c/hldfiles"
sdest="/scratch/c/shldfiles"
+tmpdir="/tmp/eventbuild"
pref="te"
sden=0
extraopts=""
[ ${sden} -eq 1 ] && extraopts="$sdopts"
-${HOME}/bin/evtbuilder_stop.sh
+./evtbuilder_stop.sh
-source ${HOME}/bin/trbnet_env.sh
+[ ! -e $tmpdir ] && mkdir -p $tmpdir
+cd $tmpdir
-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" &
+# source ${HOME}/bin/trbnet_env.sh
+
+exec uxterm -bg khaki -geometry 120x20+900+45 -e "/home/hadaq/bin/daq_evtbuild -m 2 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file ${extraopts}; read; bash" &
+# 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
+echo $pid > $tmpdir/.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 " &
+exec uxterm -bg tan -geometry 120x20+900+345 -e "/home/hadaq/bin/daq_netmem -m 2 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -q 32 -d 1 -S test ; " &
+# 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 $pid > $tmpdir/.daq_netmem.pid
-echo ${dest} > ${HOME}/trbsoft/.hldfilesdir
-echo ${sdest} > ${HOME}/trbsoft/.shldfilesdir
+echo ${dest} > $tmpdir/.hldfilesdir
+echo ${sdest} > $tmpdir/.shldfilesdir
#!/bin/bash
+tmpdir="/tmp/eventbuild"
+
killpid() {
local pidf=$1
fi
}
-pidf=${HOME}/trbsoft/.daq_evtbuild.pid
+pidf=$tmpdir/.daq_evtbuild.pid
killpid $pidf
-pidf=${HOME}/trbsoft/.daq_netmem.pid
+pidf=$tmpdir/.daq_netmem.pid
killpid $pidf