Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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 xrdcp ${WebDir}/index.html  index.html.orig.${DAT}
0009 touch ${WD}/index_test.html
0010 set j = 1
0011 foreach i (`cat tmp.list.LED`)
0012 echo ${i}
0013 set RUN=`echo ${i} | awk -F _ '{print $1}'`
0014 echo ${RUN} 
0015 ls ${WebDir}/LED_${RUN}/*.png > /dev/null
0016 if(${status} == "0") then
0017 tail -12 ${WebDir}/LED_${RUN}/index_draft.html > tmp.txt
0018 cat tmp.txt | sed s/ktemp/${j}/ >> ${WD}/index_test.html
0019 @ j = ${j} + "1"
0020 rm tmp.txt
0021 endif
0022 end
0023 
0024 set NHEAD=`grep -n 'LED Runs' index.html.orig.${DAT} | awk -F : '{print $1}'`
0025 @ NHEAD = ${NHEAD} + "13"
0026 head -n ${NHEAD} ${WD}/index.html.orig.${DAT} > ${WD}/myindex_head
0027 cat ${WD}/index_test.html >> ${WD}/myindex_head
0028 
0029 set NTAIL=`cat ${WD}/index.html.orig.${DAT} | wc -l`
0030 
0031 set NLASER=`grep -n 'LASER Runs' index.html.orig.${DAT} | awk -F : '{print $1}'`
0032 
0033 set k = ${j}
0034 
0035 cat ${WD}/index.html.orig.${DAT} | awk -F \" '2 == /s1/ {print $0}'
0036 
0037 
0038 #cat ${WD}/index.html.orig.${DAT} > index.html.orig
0039 
0040 #foreach i (`cat "index.html.orig"`)
0041 
0042 #end
0043 
0044 #foreach i (`cat index.html.orig`)
0045 #foreach i (`cat ${WD}/index.html.orig.${DAT}`)
0046 #if(${k} == ${NLASER}) then
0047 #break
0048 #endif
0049 #echo ${i}
0050 #grep s1 ${i}
0051 #if(${status} == "0") then
0052 #set ll=`echo ${i} | cut -c 30 | awk -F \< '{print $1}'`
0053 #echo ${ll} 
0054 #else
0055 #cat ${i} >> ${WD}/myindex_head
0056 #endif
0057 #@ k = ${k} + "1"
0058 #end
0059 
0060 #exit
0061 #@ NTAIL = ${NTAIL} + "1"
0062 #tail -n ${NTAIL} ${WD}/index.html.orig.${DAT} >> ${WD}/myindex_tail
0063 
0064