Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:04

0001     #!/bin/sh
0002     export PATH=$PATH:/afs/cern.ch/cms/sw/common/
0003     export FRONTIER_FORCERELOAD=long
0004     #===============Setting parameters=====================
0005     Tag=GR_21X_v2_hlt 
0006     FedCablingTag=SiStripFedCabling_$Tag
0007     NoiseTag=SiStripNoise_$Tag
0008     PedestalTag=SiStripPedestals_$Tag
0009     ThresholdTag=SiStripThreshold_$Tag
0010     CMSCondAccount=CMS_COND_21X_STRIP
0011     QtestsFileName=CondDBQtests.xml
0012     search_IoV=$PedestalTag
0013     BaseDir=/afs/cern.ch/user/h/hashemim/scratch0/     
0014     logDir=log
0015     outDir=/tmp/hashemim/
0016     CMSSWVersion=CMSSW_2_2_5
0017     #======================================================
0018     cd `dirname $0`
0019     WorkDir=`pwd`
0020     cd $BaseDir/$CMSSWVersion/src/
0021     eval `scramv1 runtime -sh`
0022     cd $BaseDir/$CMSSWVersion/src/DQM/SiStripMonitorSummary/python/
0023     scramv1 b
0024     cd $WorkDir
0025 
0026 
0027     [ ! -e $logDir ] && mkdir $logDir
0028     [ ! -e $outDir ] && mkdir $outDir
0029 
0030     cmscond_list_iov -c frontier://cmsfrontier.cern.ch:8000/FrontierProd/CMS_COND_21X_STRIP -t  $search_IoV | awk '{if(NR>4) print "Run_In "$1 " Run_End " $2}' > $logDir/list_Iov.txt
0031     
0032 
0033 
0034     touch $logDir/WhiteList_${Tag}.txt
0035 
0036     grep Run_In $logDir/list_Iov.txt | awk '{print $2}'
0037 
0038     
0039     
0040 
0041 
0042     for Run_In_number in `grep Run_In $logDir/list_Iov.txt | awk '{print $2}'`; 
0043       do
0044       [ $Run_In_number == "Total" ] && continue 
0045       
0046       RunNb=$Run_In_number
0047       RootFile_name="CondDB_"$Tag"_"$RunNb
0048 
0049 
0050       [ "`grep -c "$RunNb RUN_TAG-OK" $logDir/WhiteList_${Tag}.txt`" != "0" ] && echo "run done already, skipping!" &&  continue  
0051 
0052     # Build the cfg files:
0053       cat $BaseDir/$CMSSWVersion/src/DQM/SiStripMonitorSummary/scripts/TemplateCfg21X_PedNoise_cfg.py | sed -e "s@insert_FedCablingTag@$FedCablingTag@g" \
0054           -e "s@insert_ThresholdTag@$ThresholdTag@g" \
0055           -e "s@insert_NoiseTag@$NoiseTag@g" \
0056           -e "s@insert_PedestalTag@$PedestalTag@g" \
0057           -e "s@insertAccount@$CMSCondAccount@g" \
0058           -e "s@insert_runnumber@$RunNb@g" \
0059           -e "s@insert_QtestsFileName@$QtestsFileName@g" > $logDir/MainCfg_${RunNb}_cfg.py  
0060 
0061 #      cd $logDir      
0062 #      scramv1 b
0063 #      cd $WorkDir
0064 
0065       echo @@@ Running on run number $RunNb
0066       cmsRun $logDir/MainCfg_${RunNb}_cfg.py >  $logDir/output_${RunNb}.log
0067       exitStatus=$?
0068 
0069       if [ "$exitStatus" == "0" ]; then 
0070 #       if `mv SiStrip*.root $WorkDir/$outDir/${RootFile_name}.root` ; then
0071           if `mv DQM*.root $outDir/${RootFile_name}.root` ; then
0072               echo $RunNb" RUN_TAG-OK" >> $logDir/WhiteList_${Tag}.txt
0073           fi
0074       else
0075           echo $RunNb" RUN_TAG-BAD" >> $logDir/WhiteList_${Tag}.txt
0076       fi
0077       
0078     done
0079     
0080 
0081 
0082 
0083 
0084 
0085 
0086 
0087 
0088