Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:13

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