Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:46

0001 #!/bin/csh
0002 
0003 set DAT="test"
0004 
0005 set valdas=${1}
0006 if( ${1} == "PEDESTAL" ) then
0007 set valdas=pedestal
0008 endif
0009 
0010 if( ${1} == "LASER" ) then
0011 set valdas=laser
0012 endif
0013 
0014 set ERA=${2}
0015 
0016 echo ${valdas}
0017 
0018 ### set DAT="2015-10-07_14_50_47"
0019 
0020 set RELEASE=CMSSW_10_4_0
0021 ### Get list of done from RDM webpage ###
0022 set TYPE=${1}
0023 echo ${TYPE}
0024 if( ${TYPE} != "LED" && ${TYPE} != "LASER" && ${TYPE} != "PEDESTAL" ) then
0025 echo "Please check type " ${TYPE} "should be LED or LASER or PEDESTAL"
0026 exit
0027 endif
0028 
0029 set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/RecoHcal/HcalPromptAnalysis/test/RDM"
0030 
0031 echo ${WD}
0032 
0033 
0034 ${WD}/parce_newsql_valdas.csh ${valdas} ${DAT}
0035 ls ${WD}/${TYPE}_LIST/runlist.tmp.${DAT}
0036 
0037 set jold=194165
0038 foreach i (`cat ${WD}/${TYPE}_LIST/runlist.tmp.${DAT}`)
0039 echo "Run" ${i}
0040 
0041 set iold=`echo ${i} | awk -F _ '{print $1}'`
0042 set jold=`echo ${i} | awk -F _ '{print $2}'`
0043 set year=`echo ${i} | awk -F _ '{print $3}' | awk -F - '{print $1}'`
0044 set nevent=`echo ${i} | awk -F _ '{print $5}'`
0045 echo ${iold} ${jold} ${year} ${nevent}
0046 if( ${nevent} != "None" ) then
0047 if( ${nevent} >= "500" && ${nevent} < "1000000") then  
0048 echo  "Start job "
0049 ###${WD}/HcalRemoteMonitoringNewNew.csh ${iold} ${DAT} ${jold} ${nevent} ${TYPE}
0050 ###ls ${WD}/HcalRemoteMonitoringNewNew.csh
0051 touch ${WD}/LOG1/batchlog_${iold}.log ${WD}/LOG1/ebatchlog_${iold}.log
0052 
0053 set MYOUTJOB=${WD}/LOG1/batchlog_${iold}.log 
0054 echo ${MYOUTJOB}
0055 set MYERRJOB=${WD}/LOG1/ebatchlog_${iold}.log
0056 echo ${MYERRJOB}
0057 set MYCONDOR=${WD}/LOG1/condor.log
0058 echo ${MYCONDOR}
0059 set MYSCRIPT=${WD}/HcalRemoteMonitoringNewNew.csh 
0060 echo ${MYSCRIPT}
0061 
0062 cat >> BSUB/job_${iold}_${jold}.sub << EOF
0063 executable            = HcalRemoteMonitoringNewNew.csh
0064 arguments             = ${iold} ${DAT} ${jold} ${nevent} ${TYPE} ${ERA}
0065 output                = ${MYOUTJOB}
0066 error                 = ${MYERRJOB}
0067 log                   = ${MYCONDOR}
0068 queue 1
0069 EOF
0070 
0071 echo "Make a job"
0072 #condor_submit BSUB/job_${iold}_${jold}.sub
0073 ./HcalRemoteMonitoringNewNew.csh ${iold} ${DAT} ${jold} ${nevent} ${TYPE} ${ERA}
0074 #/afs/cern.ch/cms/caf/scripts/cmsbsub -q cmscaf1nh -o ${WD}/LOG1/batchlog_${iold}.log -e ${WD}/LOG1/ebatchlog_${iold}.log ${WD}/HcalRemoteMonitoringNewNew.csh ${iold} ${DAT} ${jold} ${nevent} ${TYPE}
0075 
0076 echo  "End job "
0077 sleep 1
0078 endif
0079 endif
0080 end