Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:17

0001 #!/bin/sh
0002 
0003 xflag=0
0004 oflag=0
0005 pflag=0
0006 while getopts 'xoph' OPTION
0007   do
0008   case $OPTION in
0009       x) xflag=1
0010           ;;
0011       o) oflag=1
0012           ;;
0013       p) pflag=1
0014           ;;
0015       h) echo "Usage: [-x] tsckey runnum"
0016           echo "  -x: write to ORCON instead of sqlite file"
0017           echo "  -o: overwrite keys"
0018           echo "  -p: centrally installed release, not on local machine"
0019           exit
0020           ;;
0021   esac
0022 done
0023 shift $(($OPTIND - 1))
0024 
0025 if [ ${pflag} -eq 0 ]
0026     then
0027     export SCRAM_ARCH=""
0028     export VO_CMS_SW_DIR=""
0029     source /opt/cmssw/cmsset_default.sh
0030 else
0031     source /nfshome0/cmssw2/scripts/setup.sh
0032 fi
0033 eval `scramv1 run -sh`
0034 export TNS_ADMIN=/nfshome0/popcondev/conddb
0035 
0036 if [ ${oflag} -eq 1 ]
0037     then
0038     overwrite="overwriteKeys=1"
0039 fi
0040 
0041 exec<rskeys.txt
0042 
0043 while read line
0044 do
0045 
0046   if [ ${xflag} -eq 0 ]
0047       then
0048       echo "Writing to sqlite_file:l1config.db instead of ORCON."
0049       cmsRun $CMSSW_BASE/src/CondTools/L1Trigger/test/L1ConfigWriteRSPayloadOnline_cfg.py outputDBConnect=sqlite_file:l1config.db outputDBAuth=. keysFromDB=0 ${line} ${overwrite} logTransactions=0 print
0050       cmsRun $CMSSW_BASE/src/CondTools/L1Trigger/test/L1ConfigWriteRSIOVOnline_cfg.py outputDBConnect=sqlite_file:l1config.db outputDBAuth=. keysFromDB=0 ${line} logTransactions=0 print
0051   else
0052       cmsRun $CMSSW_BASE/src/CondTools/L1Trigger/test/L1ConfigWriteRSPayloadOnline_cfg.py outputDBConnect=oracle://cms_orcon_prod/CMS_COND_31X_L1T outputDBAuth=/nfshome0/popcondev/conddb_taskWriters/L1T keysFromDB=0 ${line} ${overwrite} print
0053       cmsRun $CMSSW_BASE/src/CondTools/L1Trigger/test/L1ConfigWriteRSIOVOnline_cfg.py outputDBConnect=oracle://cms_orcon_prod/CMS_COND_31X_L1T outputDBAuth=/nfshome0/popcondev/conddb_taskWriters/L1T keysFromDB=0 ${line} print
0054   fi
0055 done
0056 
0057 exit