File indexing completed on 2024-04-06 12:06:30
0001
0002
0003
0004
0005
0006
0007 set WD='/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/CMSSW_5_3_8/src/RecoHcal/HcalPromptAnalysis/test/RDM'
0008 set REF=135074
0009 set LAST=`cat ${WD}/LED_LIST/LASTRUN`
0010 if( ${LAST} == "" ) then
0011 echo " Network problem: no access to the LASTRUN"
0012 exit
0013 endif
0014
0015
0016
0017 touch ${WD}/LED_LIST/done.html.${1}
0018
0019 touch ${WD}/LED_LIST/done.html.${1}
0020 touch ${WD}/LED_LIST/goodledruns.${1}
0021
0022 wget -q http://cmshcalweb01.cern.ch/DetDiag/Local_HTML/runlist.html -O ${WD}/LED_LIST/runlist.html.${1}
0023
0024 cat ${WD}/LED_LIST/runlist.html.${1} | sed s/\"//g | sed st\>\/t' 'tg | sed sk\<\/td\>kkg | sed sk\<\/a\>kkg | tr '\n' ' ' | awk -F '</tr>' '{for(i=1;i<=NF;i++) printf $i"\n"}' | awk -F '<tr> <td' '{print $2}' | tail -n +4 | sed s/' '/-/g | grep LED > ${WD}/LED_LIST/runlist.tmp0.${1}
0025
0026 touch ${WD}/LED_LIST/runlist.tmp.${1}
0027
0028 set count=0
0029
0030 foreach i (`cat ${WD}/LED_LIST/runlist.tmp0.${1}`)
0031 echo ${i}
0032 set TYPE=`echo $i | awk -F - '{print $13}'`
0033 set HTML=`echo $i | awk -F - '{print $25}' | awk -F 'href=' '{print $2}'`
0034 set RUNNUMBER=`echo $i | awk -F - '{print $9}'`
0035 set YEAR=`echo $i | awk -F - '{print $17}'`
0036 set MONTH=`echo $i | awk -F - '{print $18}'`
0037 set DAY=`echo $i | awk -F - '{print $19}'`
0038 set TIME=`echo $i | awk -F - '{print $20}'`
0039
0040 if ( ${TYPE} == "LED" ) then
0041 echo ${TYPE} ${HTML} ${RUNNUMBER}
0042 wget -q ${HTML} -O ${WD}/LED_LIST/index.html.${1}
0043 set NEVENTS=`cat ${WD}/LED_LIST/index.html.${1} | tail -n +14 | head -n 1 | awk -F '>' '{print $2}' | awk -F '<' '{print $1}'`
0044 echo ${RUNNUMBER} "Number of events" ${NEVENTS}
0045 if( ${NEVENTS} >= "1000" && ${NEVENTS}<10000 ) then
0046 echo ${RUNNUMBER} "Number of events" ${NEVENTS} >> ${WD}/LED_LIST/goodledruns.${1}
0047 grep -q ${RUNNUMBER} ${WD}/LED_LIST/done.html.${1}
0048 if( ${status} == "1") then
0049 echo "${RUNNUMBER}_${REF}" >> ${WD}/LED_LIST/runlist.tmp.${1}
0050 if( ${count} == "0" ) then
0051 rm LED_LIST/LASTRUN
0052 echo ${RUNNUMBER} > LED_LIST/LASTRUN
0053 endif
0054 @ count = ${count} + "1"
0055 endif
0056 endif
0057 rm ${WD}/LED_LIST/index.html.${1}
0058 endif
0059
0060 end
0061
0062 rm ${WD}/LED_LIST/done.html.${1}
0063 rm ${WD}/LED_LIST/runlist.html.${1}
0064
0065
0066
0067
0068
0069
0070