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     QualityTag=HotStrip_CRAFT_v3_offline
0007     FedCablingTag=SiStripFedCabling_$Tag
0008     NoiseTag=SiStripNoise_$Tag
0009     PedestalTag=SiStripPedestals_$Tag
0010     ThresholdTag=SiStripThreshold_$Tag
0011     CMSCondAccount=CMS_COND_21X_STRIP
0012     QtestsFileName=CondDBQtests.xml
0013     search_IoV=SiStripBadChannel_HotStrip_CRAFT_v3_offline
0014     BaseDir=/afs/cern.ch/user/h/hashemim/scratch0/     
0015     logDir=log
0016     outDir=/tmp/hashemim/
0017     CMSSWVersion=CMSSW_2_2_5
0018     #======================================================
0019     cd `dirname $0`
0020     WorkDir=`pwd`
0021     cd $BaseDir/$CMSSWVersion/src/
0022     eval `scramv1 runtime -sh`
0023     cd $BaseDir/$CMSSWVersion/src/DQM/SiStripMonitorSummary/python/
0024     scramv1 b
0025     cd $WorkDir
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_Quality_${QualityTag}.txt
0031 
0032 
0033     touch $logDir/WhiteList_${QualityTag}_SiStripQuality.txt
0034 
0035     grep Run_In $logDir/list_Iov_Quality_${QualityTag}.txt | awk '{print $2}'
0036 
0037 
0038 
0039 
0040     
0041     for Run_In_number in `grep Run_In $logDir/list_Iov_Quality_${QualityTag}.txt | awk '{print $2}'`;
0042       do
0043       
0044       [ $Run_In_number == "Total" ] && continue 
0045       
0046       RunNb=$Run_In_number
0047       RootFile_name="Quality_"$QualityTag"_"$RunNb
0048 
0049 
0050       [ "`grep -c "$RunNb RUN_TAG-OK" $logDir/WhiteList_${QualityTag}_SiStripQuality.txt`" != "0" ] && echo "run done already, skipping!" &&    continue  
0051    # Build the cfg files:
0052       cat $BaseDir/$CMSSWVersion/src/DQM/SiStripMonitorSummary/scripts/TemplateCfg21X_Quality_cfg.py | sed -e "s@insert_FedCablingTag@$FedCablingTag@g" \
0053           -e "s@insert_ThresholdTag@$ThresholdTag@g" \
0054           -e "s@insert_NoiseTag@$NoiseTag@g" \
0055           -e "s@insert_PedestalTag@$PedestalTag@g" \
0056           -e "s@insertAccount@$CMSCondAccount@g" \
0057           -e "s@insert_DB_Tag@$search_IoV@g" \
0058           -e "s@insert_runnumber@$RunNb@g" \
0059           -e "s@insert_QtestsFileName@$QtestsFileName@g" > $logDir/MainCfg_${RunNb}_QualityOnly_cfg.py
0060 
0061       echo @@@ Running on run number $RunNb
0062       cmsRun $logDir/MainCfg_${RunNb}_QualityOnly_cfg.py >  $logDir/output_${RunNb}_QualityOnly.log
0063       exitStatus=$?
0064 
0065       if [ "$exitStatus" == "0" ]; then 
0066           if `mv SiStrip*.root ${outDir}/${RootFile_name}.root` ; then
0067               echo $RunNb" RUN_TAG-OK" >> $logDir/WhiteList_${QualityTag}_SiStripQuality.txt
0068           fi
0069       else
0070           echo $RunNb" RUN_TAG-BAD" >> $logDir/WhiteList_${QualityTag}_SiStripQuality.txt
0071       fi
0072 
0073     done
0074 
0075 
0076 
0077 
0078 
0079 
0080 
0081 
0082 
0083