Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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       g) gflag=1
0017           ;;
0018       h) echo "Usage: [-x] runnum l1key"
0019           echo "  -o: overwrite keys"
0020           echo "  -x: write to ORCON instead of sqlite file"
0021           echo "  -f: force IOV update"
0022           echo "  -g: GT RS records only"
0023           exit
0024           ;;
0025   esac
0026 done
0027 shift $(($OPTIND - 1))
0028 
0029 runnum=$1
0030 l1Key=$2
0031 
0032 
0033 echo "INFO: ADDITIONAL CMS OPTIONS:  " $CMS_OPTIONS
0034 
0035 if [ ${gflag} -eq 1 ] 
0036 then
0037      OBJKEYS=`$CMSSW_BASE/src/CondTools/L1Trigger/scripts/getKeys.sh -g ${l1Key}`
0038 else
0039      OBJKEYS=`$CMSSW_BASE/src/CondTools/L1Trigger/scripts/getKeys.sh -r ${l1Key}`
0040 fi
0041 echo "INFO:  OBJECT KEYS:  " $OBJKEYS
0042 
0043 if [ ${xflag} -eq 0 ]
0044 then
0045     echo "Writing to sqlite_file:l1config.db instead of ORCON."
0046     DB_OPTIONS="outputDBConnect=sqlite_file:l1config.db outputDBAuth=." 
0047 else
0048     echo "Cowardly refusing to write to the online database"
0049     DB_OPTIONS="outputDBConnect=oracle://cms_orcoff_prep/CMS_CONDITIONS outputDBAuth=." 
0050     # WHEN READY FOR PRIME TIME:
0051     # DB_OPTIONS= "outputDBConnect=oracle://cms_orcon_prod/CMS_COND_31X_L1T outputDBAuth=."
0052 fi
0053 
0054 
0055 cmsRun $CMSSW_BASE/src/CondTools/L1Trigger/test/L1ConfigWriteRSOnline_cfg.py runNumber=${runnum} ${DB_OPTIONS} ${CMS_OPTIONS} logTransactions=0 $OBJKEYS keysFromDB=0 print
0056 o2ocode=$?
0057 
0058 if [ ${o2ocode} -ne 0 ] 
0059 then
0060     if [ ${o2ocode} -eq 66 ] 
0061     then
0062         echo "L1-O2O-ERROR: unable to connect to OMDS or ORCON.  Check that /nfshome0/centraltspro/secure/authentication.xml is up to date (OMDS)."
0063         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
0064     else
0065         if [ ${o2ocode} -eq 65 ] 
0066         then
0067             echo "L1-O2O-ERROR: problem writing object to ORCON."
0068             echo "L1-O2O-ERROR: problem writing object to ORCON." 1>&2
0069         fi
0070     fi
0071 else
0072     echo "runL1-o2o-rs-keysFromL1Key.sh ran successfully."
0073 fi
0074 exit ${o2ocode}
0075