Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:27

0001 #!/bin/csh
0002 
0003 ###set DAT="TEST"
0004 ###set DAT="2015-10-07_14_50_47"
0005 
0006 cmsenv
0007 
0008 set DAT=`date '+%Y-%m-%d_%H_%M_%S'`
0009 set ERA=${2}
0010 set RELEASE=${CMSSW_VERSION}
0011 
0012 ### Get list of done from RDM webpage ###
0013 set TYPE=${1}
0014 echo ${TYPE}
0015 if( ${TYPE} != "LED" && ${TYPE} != "LASER" && ${TYPE} != "PEDESTAL" ) then
0016 echo "Please check type " ${TYPE} "should be LED or LASER or PEDESTAL"
0017 exit
0018 endif
0019 
0020 set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript"
0021 set SCRIPT=`pwd`
0022 set PYTHON=${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python
0023 echo ${WD}
0024 
0025 ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/scripts/rmt/parce_newsql_aleko.csh ${TYPE} ${DAT} ${ERA} 
0026 
0027 ls ${WD}/${TYPE}_LIST/runlist.tmp.${DAT}
0028 rm ${WD}/${TYPE}_LIST/RUNS_TMP
0029 cat ${WD}/${TYPE}_LIST/runlist.tmp.${DAT} > ${WD}/${TYPE}_LIST/RUNS_TMP
0030 
0031 set jold=194165
0032 foreach i (`cat ${WD}/${TYPE}_LIST/RUNS_TMP`)
0033 echo "Run" ${i}
0034 
0035 set iold=`echo ${i} | awk -F _ '{print $1}'`
0036 set jold=`echo ${i} | awk -F _ '{print $2}'`
0037 set year=`echo ${i} | awk -F _ '{print $3}' | awk -F - '{print $1}'`
0038 set nevent=`echo ${i} | awk -F _ '{print $5}'`
0039 echo ${iold} ${jold} ${year} ${nevent}
0040 if( ${nevent} != "None" ) then
0041 if( ${nevent} >= "500" && ${nevent} <= "11000") then  
0042 echo  "Start job "
0043 
0044 touch ${WD}/BATCHLOG/batchlog_${iold}.log ${WD}/BATCHLOG/ebatchlog_${iold}.log
0045 set MYOUTJOB=${WD}/BATCHLOG/batchlog_${iold}.log 
0046 echo ${MYOUTJOB}
0047 set MYERRJOB=${WD}/BATCHLOG/ebatchlog_${iold}.log
0048 echo ${MYERRJOB}
0049 set MYCONDOR=${WD}/BATCHLOG/condor.log
0050 echo ${MYCONDOR}
0051 
0052 rm ${WD}/BSUB/job_${iold}_${jold}.sub
0053 cat >> ${WD}/BSUB/job_${iold}_${jold}.sub << EOF
0054 executable            = ${SCRIPT}/HcalRemoteMonitoringNewNewTest.csh
0055 arguments             = ${iold} ${DAT} ${jold} ${nevent} ${TYPE} ${ERA} ${RELEASE} ${SCRAM_ARCH} ${PYTHON}
0056 output                = ${MYOUTJOB}
0057 error                 = ${MYERRJOB}
0058 log                   = ${MYCONDOR}
0059 +JobFlavour           = "workday"
0060 queue 1
0061 EOF
0062 
0063 echo "Make a job"
0064 condor_submit ${WD}/BSUB/job_${iold}_${jold}.sub
0065 echo  "End job "
0066 sleep 1
0067 endif
0068 endif
0069 end