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 setenv MH `pwd`
0049 
0050 mkdir /tmp/kodolova/${runnumber}
0051 setenv WORK /tmp/kodolova/${runnumber}
0052 
0053 cd ${WORK}
0054 source /cvmfs/cms.cern.ch/cmsset_default.csh
0055 cd ${WORK}
0056 cmsrel ${RELEASE} 
0057 cd ${RELEASE}/src
0058 cmsenv
0059 
0060 pwd  
0061 
0062 ls -l
0063 echo /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis
0064 
0065 cp -r /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis `pwd`/
0066 cp -r /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/Calibration `pwd`/
0067 scramv1 build
0068 
0069 #cd ${MH}
0070 #exit
0071 
0072 cd ${WORK}
0073 set HistoDirTMP="./"
0074 pwd > ${WD}/LOG/log_${runnumber}
0075 
0076 cp ${SCRIPT}/remoteMonitoring_${CALIB}_${ERA}_cfg.py ${WORK}
0077 cp ${WD}/${CALIB}_LIST/runlist.tmp.${2} ${WORK}/runlist.tmp
0078 ls  >> ${WD}/LOG/log_${runnumber}
0079 
0080 echo "WORKDIR " ${WD} ${WORK}
0081 
0082 echo " Start CMS run " >> ${WD}/LOG/log_${runnumber}
0083 echo ${LD_LIBRARY_PATH} >> ${WD}/LOG/log_${runnumber}
0084 echo ${HistoDir} >> ${WD}/LOG/log_${runnumber} 
0085 echo ${CMSSW_BASE} >> ${WD}/LOG/log_${runnumber}
0086 pwd >> ${WD}/LOG/log_${runnumber}
0087 ls ${WORK} >> ${WD}/LOG/log_${runnumber}
0088 
0089 mkdir run${runnumber}
0090 
0091 xrdcp ${fullSrc}/USC_${runnumber}.root run${runnumber}/USC_${runnumber}.root 
0092 
0093 echo "File was copied to workdir" >> & ${WD}/LOG/log_${runnumber}
0094 
0095 set runpath="file:."
0096 
0097 cmsRun remoteMonitoring_${CALIB}_${ERA}_cfg.py ${runnumber} ${runpath} ${HistoDirTMP} >> & ${WD}/LOG/log_${runnumber}
0098 
0099 ls >> ${WD}/LOG/log_${runnumber}
0100 
0101 xrdcp -f ${HistoDirTMP}LED_${runnumber}.root ${HistoDir}/${CALIB}_${runnumber}.root
0102 
0103 echo "Output was copied to ${HistoDir}" >> & ${WD}/LOG/log_${runnumber}
0104 
0105 ###eos ls ${HistoDir}/${CALIB}_${runnumber}.root >> & ${WD}/LOG/log_${runnumber}
0106 
0107 echo " After CMS run ">>${WD}/LOG/log_${runnumber}
0108 cd ${MH}