#!/bin/bash
#==============================================================
#  Name:  lcls_live
#
#  Rem:   setup lcls_live invironment and call python script
#
#
#  Usage: lcls_live script_key
#
#  script_keys: 
#     match_cu_h(s)xr - Display only
#     match_cu_h(s)xr_user_input - User enters EDES(s)
#     match_cu_h(s)xr_trim - Writes to BCTRL          
#
#  Auth:  05-Aug-2011, William Colocho (colocho)
#  Rev:   dd-mmm-yyyy,  Whoever    (user):
#
#--------------------------------------------------------------

script_key=$1


echo "Sourcing Tao virtual environment"
source $TOOLS/script/ENV_Tao

case $script_key in

     "match_cu_hxr")
     echo "Running CU_HXR match script"
     python  -i $TOOLS/script/cu_hxr_dualEnergyMatch.py none none
     ;;

     "match_cu_hxr_user_input")
     echo "Running CU_HXR match script"
     python  -i $TOOLS/script/cu_hxr_dualEnergyMatch.py none user_input
     ;;

    "match_cu_hxr_trim")
     echo "Running CU_HXR match and TRIM script"
     python  -i $TOOLS/script/cu_hxr_dualEnergyMatch.py write_bdes none
     ;;

     "match_cu_sxr")
     echo "Running CU_SXR match script"
     python  -i $TOOLS/script/cu_sxr_dualEnergyMatch.py none none
     ;;

     "match_cu_sxr_user_input")
     echo "Running CU_SXR match script"
     python  -i $TOOLS/script/cu_sxr_dualEnergyMatch.py none user_input
     ;;

    "match_cu_sxr_trim")
     echo "Running CU_SXR match and TRIM script"
     python  -i $TOOLS/script/cu_sxr_dualEnergyMatch.py write_bdes none
     ;;

esac
