#!/bin/sh

if [ ${#} -eq 0 ] ; then
  echo " "
  echo "Give a test number:"
  echo "   1=data from one file  2=data from one dir  3=cm connection to fbsim_1"
  echo "   4=static cm connection as tutu  5=cm connection to fbsim_1 (only time plot)"
  echo "                                   6=cm connection to fbsim_1 (only fft plot)"
  echo "                                   7=data from file (only time-frequency plot)"
  echo " "
  exit 0 
fi

cd /virgoDev/Dy/v8r06p2/test

# First test
if [ ${1} -eq "1" ] ; then
  ../OSF1/dataDisplay ddfileall.car
fi

# Second test
if [ ${1} -eq "2" ] ; then
  ../OSF1/dataDisplay dddirall.car
fi

# Third test
if [ ${1} -eq "3" ] ; then
  xterm -sb -sl 1024 -geometry 168x10+10+0   -T "fbsim_1 - `date +\"%d %b %Y-%T\"`"  -e /virgoDev/Fd/v3r10/OSF1/FBSim tutu &
  sleep 2
  ../OSF1/dataDisplay ddcmall.car
  /virgoApp/Cm/v7r10/OSF1/cm.exe send -to fbsim_1 -type FdStop
fi

# Fourth test
if [ ${1} -eq "4" ] ; then
  xterm -sb -sl 1024 -geometry 168x10+10+0   -T "fbsim_1 - `date +\"%d %b %Y-%T\"`"  -e /virgoDev/Fd/v3r10/OSF1/FBSim tutu &
  sleep 2
  ../OSF1/dataDisplay ddcmstaticall.car
  /virgoApp/Cm/v7r10/OSF1/cm.exe send -to fbsim_1 -type FdStop
fi

# Fith test
if [ ${1} -eq "5" ] ; then
  xterm -sb -sl 1024 -geometry 168x10+10+0   -T "fbsim_1 - `date +\"%d %b %Y-%T\"`"  -e /virgoDev/Fd/v3r10/OSF1/FBSim tutu &
  sleep 2
  ../OSF1/dataDisplay ddcmtime.car
  /virgoApp/Cm/v7r10/OSF1/cm.exe send -to fbsim_1 -type FdStop
fi

# Sixth test
if [ ${1} -eq "6" ] ; then
  xterm -sb -sl 1024 -geometry 168x10+10+0   -T "fbsim_1 - `date +\"%d %b %Y-%T\"`"  -e /virgoDev/Fd/v3r10/OSF1/FBSim tutu &
  sleep 2
  ../OSF1/dataDisplay ddcmfft.car
  /virgoApp/Cm/v7r10/OSF1/cm.exe send -to fbsim_1 -type FdStop
fi

# Sixth test
if [ ${1} -eq "7" ] ; then
  ../OSF1/dataDisplay ddfiletimefreq.car
fi


