File indexing completed on 2024-04-06 12:03:13
0001
0002
0003 tflag=0
0004 rflag=0
0005 gflag=0
0006 while getopts 'trgh' OPTION
0007 do
0008 case $OPTION in
0009 t) tflag=1
0010 ;;
0011 r) rflag=1
0012 ;;
0013 g) gflag=1
0014 ;;
0015 h) echo "Usage: [-tr] L1_KEY"
0016 echo " -t: print TSC key"
0017 echo " -r: print RS keys"
0018 echo " -g: GT RS keys only"
0019 exit
0020 ;;
0021 esac
0022 done
0023 shift $(($OPTIND - 1))
0024
0025 getColumnFromL1Key()
0026 {
0027 COLUMN=$1
0028
0029 DB="cms_omds_lb"
0030 USER="cms_trg_r"
0031
0032 PASSWORD_FILE=/nfshome0/centraltspro/secure/$USER.txt
0033 PASSWORD=`cat $PASSWORD_FILE`
0034
0035 RESULT=`sqlplus -s <<!
0036 $USER/$PASSWORD@$DB
0037 SET FEEDBACK OFF;
0038 SET HEADING OFF;
0039 SET LINESIZE 500;
0040 select $COLUMN
0041 from CMS_TRG_L1_CONF.L1_CONF_DETAILS_VIEW
0042 where L1_KEY='$L1_KEY';
0043 !`
0044
0045 echo $RESULT
0046 }
0047
0048 if [[ $
0049 echo "Usage:"
0050 echo "$0 <L1 key>"
0051 exit 1
0052 fi
0053
0054 L1_KEY=$1
0055
0056 if [ ${tflag} -eq 1 ]
0057 then
0058 TSC_KEY=`getColumnFromL1Key TSC_KEY`
0059 echo ${TSC_KEY}
0060 fi
0061
0062 if [ ${rflag} -eq 1 ]
0063 then
0064 GT_RS_FINAL_OR_ALGO_KEY=`getColumnFromL1Key GT_RS_FINAL_OR_ALGO_KEY`
0065 GT_RS_FINAL_OR_TECH_KEY=`getColumnFromL1Key GT_RS_FINAL_OR_TECH_KEY`
0066 GT_RS_VETO_TECH_KEY=`getColumnFromL1Key GT_RS_VETO_TECH_KEY`
0067 GT_RS_KEY=`getColumnFromL1Key GT_RS_KEY`
0068 GMT_RS_KEY=`getColumnFromL1Key GMT_RS_KEY`
0069 GCT_RS_KEY=`getColumnFromL1Key GCT_RS_KEY`
0070 RCT_RS_KEY=`getColumnFromL1Key RCT_RS_KEY`
0071 DTTF_RS_KEY=`getColumnFromL1Key DTTF_RS_KEY`
0072 echo "L1GtTriggerMaskAlgoTrigRcdKey=$GT_RS_FINAL_OR_ALGO_KEY L1GtTriggerMaskTechTrigRcdKey=$GT_RS_FINAL_OR_TECH_KEY L1GtTriggerMaskVetoTechTrigRcdKey=$GT_RS_VETO_TECH_KEY L1GtPrescaleFactorsAlgoTrigRcdKey=$GT_RS_KEY L1GtPrescaleFactorsTechTrigRcdKey=$GT_RS_KEY L1MuGMTChannelMaskRcdKey=$GMT_RS_KEY L1GctChannelMaskRcdKey=$GCT_RS_KEY L1RCTChannelMaskRcdKey=$RCT_RS_KEY L1MuDTTFMasksRcdKey=$DTTF_RS_KEY"
0073 fi
0074
0075 if [ ${gflag} -eq 1 ]
0076 then
0077 GT_RS_FINAL_OR_ALGO_KEY=`getColumnFromL1Key GT_RS_FINAL_OR_ALGO_KEY`
0078 GT_RS_FINAL_OR_TECH_KEY=`getColumnFromL1Key GT_RS_FINAL_OR_TECH_KEY`
0079 GT_RS_VETO_TECH_KEY=`getColumnFromL1Key GT_RS_VETO_TECH_KEY`
0080 GT_RS_KEY=`getColumnFromL1Key GT_RS_KEY`
0081 echo "L1GtTriggerMaskAlgoTrigRcdKey=$GT_RS_FINAL_OR_ALGO_KEY L1GtTriggerMaskTechTrigRcdKey=$GT_RS_FINAL_OR_TECH_KEY L1GtTriggerMaskVetoTechTrigRcdKey=$GT_RS_VETO_TECH_KEY L1GtPrescaleFactorsAlgoTrigRcdKey=$GT_RS_KEY L1GtPrescaleFactorsTechTrigRcdKey=$GT_RS_KEY"
0082 fi
0083
0084 exit 0
0085
0086 EOF