Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 xflag=0
0003 gflag=0
0004 
0005 CMS_OPTIONS=""
0006 
0007 while getopts 'oxfgh' OPTION
0008   do
0009   case $OPTION in
0010       o) CMS_OPTIONS=$CMS_OPTIONS" overwriteKeys=1"
0011           ;;
0012       x) xflag=1
0013           ;;
0014       f) CMS_OPTIONS=$CMS_OPTIONS" forceUpdate=1"
0015           ;;
0016       h) echo "Usage: [-x] runnum l1key"
0017           echo "  -o: overwrite keys"
0018           echo "  -x: write to ORCON instead of sqlite file"
0019           echo "  -f: force IOV update"
0020           exit
0021           ;;
0022   esac
0023 done
0024 shift $(($OPTIND - 1))
0025 
0026 runnum=$1
0027 l1Key=$2
0028 
0029 
0030 echo "INFO: ADDITIONAL CMS OPTIONS:  " $CMS_OPTIONS
0031 
0032 if [ ${xflag} -eq 0 ]
0033 then
0034     echo "Writing to sqlite_file:l1config.db instead of ORCON."
0035     DB_OPTIONS="outputDBConnect=sqlite_file:l1config.db outputDBAuth=." 
0036 else
0037     echo "Cowardly refusing to write to the online database"
0038 #    DB_OPTIONS="outputDBConnect=oracle://cms_orcoff_prep/CMS_CONDITIONS outputDBAuth=." 
0039     # WHEN READY FOR PRIME TIME:
0040     DB_OPTIONS="outputDBConnect=oracle://cms_orcon_prod/CMS_CONDITIONS outputDBAuth=."
0041 fi
0042 
0043 
0044 cmsRun $CMSSW_BASE/src/CondTools/L1TriggerExt/test/L1ConfigWriteRSOnlineExt_cfg.py runNumber=${runnum} ${DB_OPTIONS} ${CMS_OPTIONS} logTransactions=0 print
0045 o2ocode=$?
0046 
0047 if [ ${o2ocode} -ne 0 ] 
0048 then
0049     if [ ${o2ocode} -eq 66 ] 
0050     then
0051         echo "L1-O2O-ERROR: unable to connect to OMDS or ORCON.  Check that /nfshome0/centraltspro/secure/authentication.xml is up to date (OMDS)."
0052         echo "L1-O2O-ERROR: unable to connect to OMDS or ORCON.  Check that /nfshome0/centraltspro/secure/authentication.xml is up to date (OMDS)." 1>&2
0053     else
0054         if [ ${o2ocode} -eq 65 ] 
0055         then
0056             echo "L1-O2O-ERROR: problem writing object to ORCON."
0057             echo "L1-O2O-ERROR: problem writing object to ORCON." 1>&2
0058         fi
0059     fi
0060 else
0061     echo "runL1-o2o-rs-keysFromL1Key.sh ran successfully."
0062 fi
0063 exit ${o2ocode}
0064