#!/bin/sh
echo "-----------------------------"
echo ""
echo "Starting DAQ on kalle"
echo ""
echo "============================="
echo "Starting ilcserver - kill it with CTRL C"
ssh -Xfn ilcdaq@flctpc-lunddaq xterm  -T ILCSERVER -e /misc/ilcdaq/ilcserver-v4.1-nohw/ilcserver
echo "============================="
echo "Starting xterm for commands - type exit to logout"
echo "Powering on/off is normally done through the run control"
echo "Programming of PCA is normally done through the run control"
echo "To poweronoff a fec from the xterm window do:"
echo "./poweronoff --fec 1 --on/off"
echo "To program the PCA16 from the xterm window do e.g.:"
echo "./pca16 --fec 1 --data1 3E --data2 000 --verify"
ssh -Xfn ilcdaq@flctpc-lunddaq 'cd /misc/ilcdaq/; xterm' 
echo "============================="
echo "Yuou should now have a window with the ILCSERVER output"
echo "and an xterm for using the poweronoff and pca16 commands if needed"
echo "-----------------------------"
echo "waiting for ilcserver to start"
sleep 4
cd $HOME/ilcdaq/gui-v2.4
echo "Starting Run Control"
java DaqPanels &
echo "-----------------------------"
