Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-19 23:59:14

0001 #!/bin/csh
0002 
0003 #unsetenv HOME
0004 #echo "HOME" ${HOME}
0005 
0006 set runnumber=${1}
0007 set mydate=${2}
0008 set refnumber=${3}
0009 set runNevents=${4}
0010 set CALIB=${5}
0011 set ERA=${6}
0012 set RELEASE=${7}
0013 set SCRAM_ARCH=${8}
0014 set SCRIPT=${9}
0015 
0016 set fullSrc0='/eos/cms/store/group/dpg_hcal/comm_hcal/USC'
0017 set fullSrc='NO'
0018 set HistoDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT/histos'
0019 set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript"
0020 
0021 echo ${runnumber} >> ${WD}/LOG/batchlog
0022 grep -q ${runnumber} ${WD}/${CALIB}_LIST/fullSrc0_list_${mydate}
0023 if( ${status} == "0" ) then
0024 set namef0=`grep ${runnumber} ${WD}/${CALIB}_LIST/fullSrc0_list_${mydate}`
0025 set namef=`echo ${namef0} | awk '{print $1}'`
0026 echo ${namef}
0027 if( ${namef} == "run${runnumber}" ) then
0028 set fullSrc=${fullSrc0}/run${runnumber}
0029 else
0030 set fullSrc=${fullSrc0}
0031 endif
0032 
0033 echo "here"
0034 endif
0035 
0036 echo ${fullSrc} >> ${WD}/LOG/batchlog
0037 
0038 if( ${fullSrc} == "NO" ) then
0039 echo "No Batch submission" ${runnumber} >> ${WD}/LOG/batchlog
0040 exit
0041 endif
0042 
0043 echo "Batch submission" ${fullSrc} " " ${runnumber} >> ${WD}/LOG/batchlog
0044 
0045 ###exit
0046 
0047 ### We are at working node
0048 mkdir ${runnumber}
0049 setenv WORK `pwd`/${runnumber}
0050 source /cvmfs/cms.cern.ch/cmsset_default.csh
0051 cd ${WORK}
0052 cmsrel ${RELEASE} 
0053 cd ${RELEASE}/src
0054 cmsenv
0055 
0056 pwd  
0057 
0058 ls -l
0059 echo /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis
0060 
0061 cp -r /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis `pwd`/
0062 cp -r /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/Calibration `pwd`/
0063 scramv1 build
0064 
0065 cd ${WORK}
0066 set HistoDirTMP="./"
0067 pwd > ${WD}/LOG/log_${runnumber}
0068 
0069 cp ${SCRIPT}/remoteMonitoring_${CALIB}_${ERA}_cfg.py ${WORK}
0070 cp ${WD}/${CALIB}_LIST/runlist.tmp.${2} ${WORK}/runlist.tmp
0071 ls  >> ${WD}/LOG/log_${runnumber}
0072 
0073 echo "WORKDIR " ${WD} ${WORK}
0074 
0075 echo " Start CMS run " >> ${WD}/LOG/log_${runnumber}
0076 echo ${LD_LIBRARY_PATH} >> ${WD}/LOG/log_${runnumber}
0077 echo ${HistoDir} >> ${WD}/LOG/log_${runnumber} 
0078 echo ${CMSSW_BASE} >> ${WD}/LOG/log_${runnumber}
0079 pwd >> ${WD}/LOG/log_${runnumber}
0080 ls ${WORK} >> ${WD}/LOG/log_${runnumber}
0081 
0082 mkdir run${runnumber}
0083 
0084 xrdcp ${fullSrc}/USC_${runnumber}.root run${runnumber}/USC_${runnumber}.root 
0085 
0086 echo "File was copied to workdir" >> & ${WD}/LOG/log_${runnumber}
0087 
0088 set runpath="file:."
0089 
0090 cmsRun remoteMonitoring_${CALIB}_${ERA}_cfg.py ${runnumber} ${runpath} ${HistoDirTMP} >> & ${WD}/LOG/log_${runnumber}
0091 
0092 ls >> ${WD}/LOG/log_${runnumber}
0093 
0094 xrdcp -f ${HistoDirTMP}LED_${runnumber}.root ${HistoDir}/${CALIB}_${runnumber}.root
0095 
0096 echo "Output was copied to ${HistoDir}" >> & ${WD}/LOG/log_${runnumber}
0097 
0098 ###eos ls ${HistoDir}/${CALIB}_${runnumber}.root >> & ${WD}/LOG/log_${runnumber}
0099 
0100 echo " After CMS run ">>${WD}/LOG/log_${runnumber}
0101