Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #!/bin/tcsh
0002 
0003 ### Make list of files: LED, pedestal, laser
0004 #set DAT=`date '+%Y-%m-%d_%H_%M_%S'`
0005 if( ${1} != "LED" && ${1} != "laser" && ${1} != "pedestal" ) then
0006 echo " Please select run type ./parce_newsql_valdas.csh LED `date '+%Y-%m-%d_%H_%M_%S'`"
0007 exit
0008 endif
0009 
0010 set runorigped=286893
0011 set runorigled=286946
0012 set runoriglas=286766
0013 # ATTENTION:
0014 # for laser and pedestal we put runorig = run current
0015 #
0016 set RELEASE=CMSSW_10_4_0
0017 set WD=/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/RecoHcal/HcalPromptAnalysis/test/RDM
0018 
0019 set LAST=0
0020 set OUTLAST=lasttmp
0021 set runref=0
0022 set outfile=tmp
0023 
0024 echo "Here 0"
0025 
0026 if( ${1} == "LED" ) then
0027 set LAST=`cat ${WD}/LED_LIST/LASTRUN1`
0028 set OUTLAST=${WD}/LED_LIST/LASTRUN1
0029 python /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/RecoHcal/HcalPromptAnalysis/test/RDM/hcal_runs_valdas.py ${LAST} - | grep ${1} | sed 's/"//g' > tmp.list 
0030 cat tmp.list | sed s/" "/_/g > tmp.list.${1}
0031 rm tmp.list
0032 set runref=${runorigled}
0033 touch ${WD}/LED_LIST/runlist.tmp.${2}
0034 set outfile=${WD}/LED_LIST/runlist.tmp.${2}
0035 endif
0036 
0037 if( ${1} == "laser" ) then
0038 echo "Laser"
0039 set runref=${runoriglas}
0040 set LAST=`cat ${WD}/LASER_LIST/LASTRUN1`
0041 set OUTLAST=${WD}/LASER_LIST/LASTRUN1
0042 python /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/RecoHcal/HcalPromptAnalysis/test/RDM/hcal_runs_valdas.py ${LAST} - | grep ${1} | sed 's/"//g'  > tmp.list
0043 cat tmp.list | sed s/" "/_/g > tmp.list.${1}
0044 rm tmp.list
0045 touch ${WD}/LASER_LIST/runlist.tmp.${2}
0046 set outfile=${WD}/LASER_LIST/runlist.tmp.${2}
0047 endif
0048 
0049 if( ${1} == "pedestal" ) then
0050 set runref=${runorigped}
0051 set LAST=`cat ${WD}/PEDESTAL_LIST/LASTRUN1`
0052 set OUTLAST=${WD}/PEDESTAL_LIST/LASTRUN1
0053 python /afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript/${RELEASE}/src/RecoHcal/HcalPromptAnalysis/test/RDM/hcal_runs_valdas.py ${LAST} - | grep ${1} | sed 's/"//g' > tmp.list
0054 cat tmp.list | sed s/" "/_/g > tmp.list.${1}
0055 rm tmp.list
0056 touch ${WD}/PEDESTAL_LIST/runlist.tmp.${2}
0057 set outfile=${WD}/PEDESTAL_LIST/runlist.tmp.${2}
0058 endif
0059 echo "Here 1"
0060 foreach i (`cat tmp.list.${1}`)
0061 set run=`echo ${i} | awk -F_ '{print $1}'`
0062 set mydate=`echo ${i} | awk -F_ '{print $3}'`
0063 set mytime=`echo ${i} | awk -F_ '{print $4}'`
0064 set nevent=`echo ${i} | awk -F_ '{print $5}'`
0065 if( ${run} > ${LAST} ) then
0066 if( ${1} == "LED" ) then
0067 echo ${run}"_"${runref}"_"${mydate}"_"${mytime}"_"${nevent} >> ${outfile}
0068 else
0069 echo ${run}"_"${run}"_"${mydate}"_"${mytime}"_"${nevent} >> ${outfile}
0070 endif
0071 rm ${OUTLAST}
0072 echo ${run} > ${OUTLAST}
0073 endif
0074 end
0075 if( ${1} == "LED" ) then
0076 eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/LED_LIST/fullSrc0_list_${2}
0077 endif
0078 if( ${1} == "laser" ) then
0079 eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/LASER_LIST/fullSrc0_list_${2}
0080 endif
0081 if( ${1} == "pedestal" ) then
0082 eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/PEDESTAL_LIST/fullSrc0_list_${2}
0083 endif
0084