Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-19 23:59:17

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_aleko.csh LED `date '+%Y-%m-%d_%H_%M_%S'` era2019"
0007 exit
0008 endif
0009 
0010 set runorigped=286893
0011 set runorigled=286946
0012 set runoriglas=286766
0013 
0014 if( ${3} == "era2019" ) then
0015 set runorigled=328157
0016 endif
0017 
0018 # ATTENTION:
0019 # for laser and pedestal we put runorig = run current
0020 #
0021 
0022 set WD="/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/RDMScript"
0023 set SCRIPT=`pwd`
0024 
0025 set LAST=0
0026 set OUTLAST=""
0027 set runref=0
0028 set outfile=""
0029 
0030 echo "Here"  ${1}
0031 setenv HCALDQM_DBCONNECT cms_hcl_runinfo/Donald_2_Duck@cms_omds_adg
0032 
0033 if( ${1} == "LED" ) then
0034 set LAST=`cat ${WD}/LED_LIST/LASTRUN`
0035 set OUTLAST=${WD}/LED_LIST/LASTRUN
0036 echo ${LAST}
0037 python ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python/getInfo.py --runmin=${LAST} | grep LED |  awk '{print $1"_"$3"_"$4"_"$7"_"$11}' > tmp.list.${1}
0038 set runref=${runorigled}
0039 touch ${WD}/LED_LIST/runlist.tmp.${2}
0040 set outfile=${WD}/LED_LIST/runlist.tmp.${2}
0041 endif
0042 
0043 if( ${1} == "LASER" ) then
0044 echo "Laser"
0045 set runref=${runoriglas}
0046 set LAST=`cat ${WD}/LASER_LIST/LASTRUN`
0047 set OUTLAST=${WD}/LASER_LIST/LASTRUN
0048 python ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python/getInfo.py --runmin=${LAST} | grep Laser | awk '{print $1"_"$3"_"$4"_"$7"_"$11}' > tmp.list.${1}
0049 touch ${WD}/LASER_LIST/runlist.tmp.${2}
0050 set outfile=${WD}/LASER_LIST/runlist.tmp.${2}
0051 endif
0052 
0053 if( ${1} == "PEDESTAL" ) then
0054 set runref=${runorigped}
0055 set LAST=`cat ${WD}/PEDESTAL_LIST/LASTRUN`
0056 set OUTLAST=${WD}/PEDESTAL_LIST/LASTRUN
0057 python ${CMSSW_BASE}/src/DPGAnalysis/HcalTools/python/getInfo.py --runmin=${LAST} | grep Pedestal | awk '{print $1"_"$3"_"$4"_"$7"_"$11}' > tmp.list.${1}
0058 touch ${WD}/PEDESTAL_LIST/runlist.tmp.${2}
0059 set outfile=${WD}/PEDESTAL_LIST/runlist.tmp.${2}
0060 endif
0061 
0062 echo "Here 1"
0063 foreach i (`cat tmp.list.${1}`)
0064 set run=`echo ${i} | awk -F_ '{print $1}'`
0065 set mydate=`echo ${i} | awk -F_ '{print $2}'`
0066 set mytime=`echo ${i} | awk -F_ '{print $3}'`
0067 set nevent=`echo ${i} | awk -F_ '{print $4}'`
0068 echo ${run}"_"${run}"_"${mydate}"_"${mytime}"_"${nevent} >> ${outfile}
0069 rm ${OUTLAST}
0070 echo ${run} > ${OUTLAST}
0071 end
0072 if( ${1} == "LED" ) then
0073 eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/LED_LIST/fullSrc0_list_${2}
0074 endif
0075 if( ${1} == "LASER" ) then
0076 eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/LASER_LIST/fullSrc0_list_${2}
0077 endif
0078 if( ${1} == "PEDESTAL" ) then
0079 eos ls /eos/cms/store/group/dpg_hcal/comm_hcal/USC > ${WD}/PEDESTAL_LIST/fullSrc0_list_${2}
0080 endif
0081