Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #!/bin/csh
0002 pwd
0003 set CALIB=${1}
0004 set runnumber=${2}
0005 set refnumber=${3}
0006 set runNevents=${4}
0007 set RELEASE=${5}
0008 
0009 set WebDir='http://cms-hcal-dpg.web.cern.ch/cms-hcal-dpg/HcalRemoteMonitoring/RMT'
0010 set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript"
0011 set WDS="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis/HcalTools/scripts/rmt"
0012 set WDM="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis/HcalTools/macros/rmt"
0013 set HistoDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT/histos'
0014 set PlotsDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT' 
0015 
0016 ##### At local WN
0017 mkdir ${runnumber}
0018 setenv WORK `pwd`/${runnumber}
0019 source /cvmfs/cms.cern.ch/cmsset_default.csh
0020 setenv SCRAM_ARCH slc7_amd64_gcc900
0021 cd ${WORK}
0022 cmsrel ${RELEASE}
0023 cd ${RELEASE}/src
0024 cmsenv
0025 cd ${WORK}
0026 
0027 xrdcp -f ${HistoDir}/LED_${runnumber}.root .
0028 
0029 ls >> & ${WD}/LOG/logn_${runnumber}
0030 
0031 cp ${WDM}/RemoteMonitoringMAP.cc .
0032 cp ${WDM}/compile.csh .
0033 cp ${WDS}/LogEleMapdb.h .
0034 cp ${WDS}/tmp.list.LED runlist.tmp
0035 
0036 ./compile.csh RemoteMonitoringMAP.cc
0037 
0038 echo " Start CMS run ">${WD}/LOG/logn_${runnumber}
0039 echo ${LD_LIBRARY_PATH} >>${WD}/LOG/logn_${runnumber}
0040 
0041 ./RemoteMonitoringMAP.cc.exe "${HistoDir}/${CALIB}_${runnumber}.root" "${HistoDir}/${CALIB}_${refnumber}.root" "${CALIB}" >> ${WD}/LOG/logn_${runnumber}
0042 
0043 ls -l >> ${WD}/LOG/log_${runnumber}
0044 
0045 set j=`cat runlist.tmp | grep ${runnumber}`
0046 echo ${j} >> ${WD}/LOG/batchlog    
0047 setenv runtype ${CALIB}
0048 setenv runHTML NO
0049 setenv runtime `echo $j | awk -F _ '{print $3}'`
0050 setenv rundate `echo $j | awk -F _ '{print $2}'`
0051 
0052 echo 'RUN Date = '${rundate} ${runtime} >> ${WD}/LOG/batchlog    
0053 echo 'RUN Type = '${runtype} >> ${WD}/LOG/batchlog    
0054 echo 'Reference RUN number ='${refnumber} >> ${WD}/LOG/batchlog    
0055 
0056 touch index_draft.html
0057 
0058 #adding entry to list of file index_draft.html
0059 
0060 set raw=3
0061 echo '<tr>'>> index_draft.html
0062 echo '<td class="s1" align="center">'ktemp'</td>'>> index_draft.html
0063 echo '<td class="s'$raw'" align="center">'$runnumber'</td>'>> index_draft.html
0064 echo '<td class="s'$raw'" align="center">'$runtype'</td>'>> index_draft.html
0065 echo '<td class="s'$raw'" align="center">'$runNevents'</td>'>> index_draft.html
0066 echo '<td class="s'$raw'" align="center">'$rundate'</td>'>> index_draft.html
0067 echo '<td class="s'$raw'" align="center">'$runtime'</td>'>> index_draft.html
0068 echo '<td class="s'$raw'" align="center">'$refnumber'</td>'>> index_draft.html
0069 echo '<td class="s'$raw'" align="center"><a href="'$WebDir'/'${CALIB}'_'$runnumber'/MAP.html">'${CALIB}'_'$runnumber'</a></td>'>> index_draft.html
0070 echo '<td class="s'$raw'" align="center">NO</td>'>> index_draft.html
0071 echo '<td class="s'$raw'" align="center">OK</td>'>> index_draft.html
0072 echo '</tr>'>> index_draft.html
0073 
0074 #### PUT Corresponding calib type to html
0075 
0076 ls *.html >> ${WD}/LOG/log_${runnumber}
0077 
0078 foreach i (`ls *.html`)
0079 cat ${i} | sed s/LED/${CALIB}/g > ${i}_t
0080 mv ${i}_t ${i} 
0081 end
0082 
0083 ####### Copy to the new site
0084 ls *.png
0085 eos rm -rf ${PlotsDir}/${CALIB}_${runnumber}
0086 eos mkdir ${PlotsDir}/${CALIB}_${runnumber} >> & ${WD}/LOG/logn_${runnumber}
0087 
0088 if(${status} == "0") then
0089 #### Copy to the new site
0090 foreach i (`ls *.html`)
0091 xrdcp ${i} ${PlotsDir}/${CALIB}_${runnumber} 
0092 end
0093 foreach k (`ls *.png`)
0094 xrdcp ${k} ${PlotsDir}/${CALIB}_${runnumber}
0095 end
0096 endif
0097 
0098 
0099