Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #!/bin/csh
0002 ###
0003 ### Day/Time
0004 ### All files have the particular time
0005 ###
0006 #set DAT=`date '+%Y-%m-%d_%H_%M_%S'`
0007 set WD='/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/CMSSW_5_3_21/src/RecoHcal/HcalPromptAnalysis/test/RDM'
0008 set REF=135077
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 #### Uncomment after it is done
0016 
0017 wget -q http://test-dtlisov.web.cern.ch/test-dtlisov/ -O ${WD}/LED_LIST/done.html.${1}
0018 touch ${WD}/LED_LIST/done.html.${1}
0019 touch ${WD}/LED_LIST/goodledruns.${1}
0020 
0021 wget -q http://cmshcalweb01.cern.ch/DetDiag/Local_HTML/runlist.html -O ${WD}/LED_LIST/runlist.html.${1}
0022 
0023 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}
0024 
0025 touch ${WD}/LED_LIST/runlist.tmp.${1}
0026 
0027 set count=0
0028 
0029 foreach i (`cat ${WD}/LED_LIST/runlist.tmp0.${1}`)
0030 echo ${i}
0031 set TYPE=`echo $i | awk -F - '{print $13}'`
0032 set HTML=`echo $i | awk -F - '{print $25}' | awk -F 'href=' '{print $2}'`
0033 set RUNNUMBER=`echo $i | awk -F - '{print $9}'`
0034 set YEAR=`echo $i | awk -F - '{print $17}'`
0035 set MONTH=`echo $i | awk -F - '{print $18}'`
0036 set DAY=`echo $i | awk -F - '{print $19}'`
0037 set TIME=`echo $i | awk -F - '{print $20}'`
0038 
0039 if ( ${TYPE} == "LED" && ${RUNNUMBER} > ${LAST} ) then
0040 echo ${TYPE} ${HTML} ${RUNNUMBER}
0041 wget -q ${HTML} -O ${WD}/LED_LIST/index.html.${1}
0042 set NEVENTS=`cat ${WD}/LED_LIST/index.html.${1} | tail -n +14 | head -n 1 | awk -F '>' '{print $2}' | awk -F '<' '{print $1}'`
0043 echo ${RUNNUMBER} "Number of events" ${NEVENTS}
0044 #if( ${NEVENTS} >= "2000" && ${NEVENTS} < "10000" && ${RUNNUMBER} > ${LAST} ) then
0045 #if( ${NEVENTS} >= "10000" && ${RUNNUMBER} > ${LAST} ) 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}_${YEAR}-${MONTH}-${DAY}_${TIME}_${NEVENTS}" >> ${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 end
0060 
0061 rm ${WD}/LED_LIST/done.html.${1}
0062 rm ${WD}/LED_LIST/runlist.html.${1}
0063 
0064 cmsLs /store/group/dpg_hcal/comm_hcal/USC > ${WD}/LED_LIST/fullSrc0_list_${1}
0065 cmsLs /store/group/dpg_hcal/comm_hcal/LS1 > ${WD}/LED_LIST/fullSrc1_list_${1}
0066 
0067 
0068 
0069