Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:30

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}/mycurrentlist
0017 python mysortled.py ${CMSSW_VERSION}
0018 
0019 cp ${WD}/currentlist ${WD}/currentlist.LED
0020 set j=0
0021 foreach i (`cat ${WD}/currentlist`)
0022 ls ${WebDir}/${i}/*.png > /dev/null
0023 if(${status} == "0") then
0024 @ j = ${j} + "1"
0025 tail -12 ${WebDir}/${i}/index_draft.html > tmp0.txt
0026 cat tmp0.txt | sed s/MIXED_MIXED/MIXED/g > tmp.txt
0027 cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html
0028 rm tmp.txt tmp0.txt
0029 endif
0030 end
0031 rm ${WD}/currentlist
0032 rm ${WD}/mycurrentlist
0033 
0034 ls ${WebDir} | grep LASER_ | sort -r > ${WD}/currentlist
0035 set j=0
0036 foreach i (`cat ${WD}/currentlist`)
0037 ls ${WebDir}/${i}/*.png > /dev/null
0038 if(${status} == "0") then
0039 @ j = ${j} + "1"
0040 tail -12 ${WebDir}/${i}/index_draft.html > tmp.txt
0041 cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html
0042 rm tmp.txt
0043 endif
0044 end
0045 rm ${WD}/currentlist
0046 
0047 ls ${WebDir} | grep PEDESTAL_ | sort -r > ${WD}/mycurrentlist
0048 #### need to set the order according run number
0049 python mysort.py ${CMSSW_VERSION}
0050 set j=0
0051 foreach i (`cat ${WD}/currentlist`)
0052 ls ${WebDir}/${i}/*.png > /dev/null
0053 if(${status} == "0") then
0054 @ j = ${j} + "1"
0055 tail -12 ${WebDir}/${i}/index_draft.html > tmp.txt
0056 cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html
0057 rm tmp.txt
0058 endif
0059 end
0060 rm ${WD}/currentlist
0061 rm ${WD}/mycurrentlist
0062 
0063 cat ${WD}/footer.txt >> ${WD}/index_test.html
0064 
0065 cp ${WD}/index_test.html ${WebDir}/index.html
0066 mv ${WD}/index_test.html ${WD}/index_test.html.${DAT}
0067 #rm ${WD}/currentlist
0068 #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
0069 #xrdcp -f tmp.html /eos/cms/store/group/dpg_hcal/comm_hcal/www/HcalRemoteMonitoring/RMT/index.html
0070 #rm tmp.html