Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:47

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=224708
0009 set LAST=`cat ${WD}/LASER_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}/LASER_LIST/done.html.${1}
0018 #touch ${WD}/LASER_LIST/done.html.${1}
0019 #touch ${WD}/LASER_LIST/goodledruns.${1}
0020 
0021 wget -q http://cmshcalweb01.cern.ch/DetDiag/Local_HTML/runlist.html -O ${WD}/LASER_LIST/runlist.html.${1}
0022 
0023 cat ${WD}/LASER_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 LASER > ${WD}/LASER_LIST/runlist.tmp0.${1}
0024 
0025 touch ${WD}/LASER_LIST/runlist.tmp.${1}
0026 
0027 set count=0
0028 
0029 foreach i (`cat ${WD}/LASER_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 echo "Type" ${TYPE} 
0040 echo " RunNumber" ${RUNNUMBER}
0041 
0042 if ( ${TYPE} == "LASER" && ${RUNNUMBER} > ${LAST} ) then
0043 echo ${TYPE} ${HTML} ${RUNNUMBER}
0044 wget -q ${HTML} -O ${WD}/LASER_LIST/index.html.${1}
0045 set NEVENTS=`cat ${WD}/LASER_LIST/index.html.${1} | tail -n +14 | head -n 1 | awk -F '>' '{print $2}' | awk -F '<' '{print $1}'`
0046 echo ${RUNNUMBER} "Number of events" ${NEVENTS}
0047 #if( ${NEVENTS} >= "2000" && ${NEVENTS} < "10000" && ${RUNNUMBER} > ${LAST} ) then
0048 #if( ${NEVENTS} >= "10000" && ${RUNNUMBER} > ${LAST} ) then
0049 echo ${RUNNUMBER} "Number of events" ${NEVENTS} >> ${WD}/LASER_LIST/goodledruns.${1}
0050 #grep -q ${RUNNUMBER} ${WD}/LASER_LIST/done.html.${1}
0051 #if( ${status} == "1") then
0052 echo "${RUNNUMBER}_${REF}_${YEAR}-${MONTH}-${DAY}_${TIME}_${NEVENTS}" >> ${WD}/LASER_LIST/runlist.tmp.${1} 
0053 if( ${count} == "0" ) then
0054 rm LASER_LIST/LASTRUN
0055 echo ${RUNNUMBER} > LASER_LIST/LASTRUN
0056 endif
0057 @ count = ${count} + "1"
0058 #endif
0059 #endif
0060 rm ${WD}/LASER_LIST/index.html.${1}
0061 endif
0062 end
0063 
0064 #rm ${WD}/LASER_LIST/done.html.${1}
0065 #rm ${WD}/LASER_LIST/runlist.html.${1}
0066 
0067 cmsLs /store/group/dpg_hcal/comm_hcal/USC > ${WD}/LASER_LIST/fullSrc0_list_${1}
0068 cmsLs /store/group/dpg_hcal/comm_hcal/LS1 > ${WD}/LASER_LIST/fullSrc1_list_${1}
0069 
0070 
0071 
0072