File indexing completed on 2024-04-06 12:03:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 nflag=0
0013 pflag=0
0014 while getopts 'nph' OPTION
0015 do
0016 case $OPTION in
0017 n) nflag=1
0018 ;;
0019 p) pflag=1
0020 ;;
0021 h) echo "Usage: [-n] l1Key"
0022 echo " -n: no RS"
0023 echo " -p: centrally installed release, not on local machine"
0024 exit
0025 ;;
0026 esac
0027 done
0028 shift $(($OPTIND - 1))
0029
0030
0031 l1Key=$1
0032
0033 if [ $
0034 then
0035 echo "Wrong number of arguments. Usage: $0 l1Key"
0036 exit 127
0037 fi
0038
0039 if [ -f l1config.db ]
0040 then
0041 mv l1config.db l1config.db.save
0042 fi
0043
0044 ln -sf /nfshome0/centraltspro/secure/authentication.xml .
0045
0046 if [ ${pflag} -eq 0 ]
0047 then
0048 export SCRAM_ARCH=""
0049 export VO_CMS_SW_DIR=""
0050 source /opt/cmssw/cmsset_default.sh
0051 else
0052 source /nfshome0/cmssw2/scripts/setup.sh
0053 centralRel="-p"
0054 fi
0055 eval `scramv1 run -sh`
0056
0057 echo "`date` : initializing sqlite file for L1KEY ${l1Key}"
0058 if [ -e $CMSSW_BASE/src/CondFormats/L1TObjects/xml ]
0059 then
0060 $CMSSW_BASE/src/CondTools/L1Trigger/test/bootstrap.com -l
0061 else
0062 $CMSSW_RELEASE_BASE/src/CondTools/L1Trigger/test/bootstrap.com
0063 fi
0064
0065
0066 cmsRun $CMSSW_BASE/src/CondTools/L1Trigger/test/L1ConfigWritePayloadCondDB_cfg.py inputDBConnect=oracle://cms_orcon_prod/CMS_COND_31X_L1T inputDBAuth=/nfshome0/popcondev/conddb_taskWriters/L1T
0067 cmsRun $CMSSW_BASE/src/CondTools/L1Trigger/test/L1ConfigWriteIOVDummy_cfg.py useO2OTags=1
0068
0069 echo "`date` : writing TSC payloads"
0070 tscKey=`$CMSSW_BASE/src/CondTools/L1Trigger/scripts/getKeys.sh -t ${l1Key}`
0071 $CMSSW_BASE/src/CondTools/L1Trigger/scripts/runL1-O2O-key.sh -c ${centralRel} ${tscKey}
0072 o2ocode=$?
0073
0074 if [ ${o2ocode} -eq 0 ]
0075 then
0076 echo "L1-O2O-INFO: TSC payloads OK"
0077 else
0078 echo "L1-O2O-ERROR: TSC payloads not OK!"
0079 echo "L1-O2O-ERROR: TSC payloads not OK!" 1>&2
0080 exit ${o2ocode}
0081 fi
0082
0083 echo "`date` : setting TSC IOVs"
0084 $CMSSW_BASE/src/CondTools/L1Trigger/scripts/runL1-O2O-iov.sh ${centralRel} 10 ${tscKey}
0085 o2ocode=$?
0086
0087 if [ ${o2ocode} -eq 0 ]
0088 then
0089 echo "L1-O2O-INFO: TSC IOVs OK"
0090 else
0091 echo "L1-O2O-ERROR: TSC IOVs not OK!"
0092 echo "L1-O2O-ERROR: TSC IOVs not OK!" 1>&2
0093 exit ${o2ocode}
0094 fi
0095
0096 if [ ${nflag} -eq 0 ]
0097 then
0098 echo "`date` : writing RS payloads and setting RS IOVs"
0099 $CMSSW_BASE/src/CondTools/L1Trigger/scripts/runL1-O2O-rs-keysFromL1Key.sh ${centralRel} 10 ${l1Key}
0100 o2ocode=$?
0101
0102 if [ ${o2ocode} -eq 0 ]
0103 then
0104 echo "L1-O2O-INFO: RS OK"
0105 else
0106 echo "L1-O2O-ERROR: RS not OK!"
0107 echo "L1-O2O-ERROR: RS not OK!" 1>&2
0108 exit ${o2ocode}
0109 fi
0110 else
0111 echo "`date` : using default RS payloads"
0112 fi
0113
0114 rm -f authentication.xml
0115
0116 exit ${o2ocode}