Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #!/bin/csh
0002 set DAT=`date '+%Y-%m-%d_%H_%M_%S'`
0003 set RELEASE=${CMSSW_VERSION}
0004 echo ${CMSSW_VERSION} ${RELEASE}
0005 set WebDir='/eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT'
0006 set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/DPGAnalysis/HcalTools/scripts/rmt"
0007 
0008 rm ${WD}/index_test.html
0009 touch ${WD}/index_test.html
0010 xrdcp ${WebDir}/index.html index.html.orig.${DAT}
0011 
0012 set NHEAD=`grep -n 'LED Runs' index.html.orig.${DAT} | awk -F : '{print $1}'`
0013 @ NHEAD = ${NHEAD} + "13"
0014 head -n ${NHEAD} ${WD}/index.html.orig.${DAT} >> ${WD}/index_test.html
0015 
0016 ls ${WebDir} | grep LED_ | sort -r > ${WD}/currentlist
0017 cp ${WD}/currentlist ${WD}/currentlist.LED
0018 set j=0
0019 foreach i (`cat ${WD}/currentlist`)
0020 ls ${WebDir}/${i}/*.png > /dev/null
0021 if(${status} == "0") then
0022 @ j = ${j} + "1"
0023 tail -12 ${WebDir}/${i}/index_draft.html > tmp.txt
0024 cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html
0025 rm tmp.txt
0026 endif
0027 end
0028 rm ${WD}/currentlist
0029 
0030 ls ${WebDir} | grep LASER_ | sort -r > ${WD}/currentlist
0031 set j=0
0032 foreach i (`cat ${WD}/currentlist`)
0033 ls ${WebDir}/${i}/*.png > /dev/null
0034 if(${status} == "0") then
0035 @ j = ${j} + "1"
0036 tail -12 ${WebDir}/${i}/index_draft.html > tmp.txt
0037 cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html
0038 rm tmp.txt
0039 endif
0040 end
0041 rm ${WD}/currentlist
0042 
0043 ls ${WebDir} | grep PEDESTAL_ | sort -r > ${WD}/currentlist
0044 set j=0
0045 foreach i (`cat ${WD}/currentlist`)
0046 ls ${WebDir}/${i}/*.png > /dev/null
0047 if(${status} == "0") then
0048 @ j = ${j} + "1"
0049 tail -12 ${WebDir}/${i}/index_draft.html > tmp.txt
0050 cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html
0051 rm tmp.txt
0052 endif
0053 end
0054 rm ${WD}/currentlist
0055 
0056 cat ${WD}/footer.txt >> ${WD}/index_test.html
0057 
0058 #mv ${WD}/index_test.html ${WebDir}/index.html
0059 #rm ${WD}/currentlist
0060 #cat ${WebDir}/index.html | sed 's#cms-cpt-software.web.cern.ch\/cms-cpt-software\/General\/Validation\/SVSuite#cms-conddb-prod.cern.ch\/eosweb\/hcal#g'> tmp.html
0061 #xrdcp -f tmp.html /eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT/index.html
0062 #rm tmp.html