Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:19

0001 #!/bin/bash
0002 eval `scramv1 runtime -sh`
0003 #needed infos to run script
0004 if [ $# -lt 3 ];
0005 then echo "Usage: "
0006      echo "./run_full_validation.sh \"tag_orcoff\" \"tag_sqlite\" \"dbfile\""
0007      echo "TAGs without leading CondDB!!!"
0008      exit 0;
0009      
0010 fi
0011 
0012 #input variables
0013 tag1=$1;
0014 tag2=$2;
0015 dbfile=$3;
0016 
0017 ### FedCabling Validation
0018 echo "Beginning FedCabling validation!";
0019 echo -e "++++++++++++++++++++++++++++++++++++++\n";
0020 
0021 for i in `ls CondDB_$tag1* | sed -e s@_@.@g | awk -F'.' '{print $6}'`
0022 do
0023 echo -e "Doing pedestal and noise validation for run $i:\n"
0024 ./fedcabling_validation.sh $dbfile $i SiStripFedCabling_$tag1 > validation_fedcabling_$i.txt
0025 if [ `cat validation_fedcabling_$i.txt | grep "O2O was successful:" | wc -l` -gt 0 ]
0026  then  echo -e '\033[1;32m'"FEDCabling Validation successful!"`tput sgr0`
0027 else echo -e '\033[1;31m'"FEDCabling Cabling has changed, please check output!"`tput sgr0`
0028 fi
0029 echo -e "\n"
0030 done
0031 
0032 
0033 ### Ped&Noise Validation
0034 echo "Beginning pedestal & noise validation!"
0035 echo -e "++++++++++++++++++++++++++++++++++++++\n"
0036 
0037 
0038 make
0039 
0040 for i in `ls CondDB_$tag1* | sed -e s@_@.@g | awk -F'.' '{print $6}'`
0041 do
0042 echo -e "Doing pedestal and noise validation for run $i:\n"
0043 ./pednoise_validation $i $i CondDB_$tag1 CondDB_$tag2 > validation_pednoise_$i.txt
0044 sum=0;
0045   for j in `cat validation_pednoise_$i.txt | grep "Nr of missing modules:"| awk '{print $5}'`
0046    do
0047    sum=`expr $sum + $j`    
0048   done
0049 
0050   if [ $sum -lt 1 ]
0051       then if [ `cat  validation_pednoise_$i.txt | grep "Number of non matching DetIds:"| awk '{print $6}'` -lt 1 ]
0052           then  echo -e '\033[1;32m'"[Ped&Noise Validation] Validation successful!"`tput sgr0`
0053       else echo -e '\033[1;31m'"[Ped&Noise Validation] Noise and/or Pedestal of some modules don't match, please check output!"`tput sgr0`
0054       fi
0055   else echo '\033[1;31m'"[Ped&Noise Validation] Some modules are missing in one file, please check output!"`tput sgr0`;
0056   fi
0057 echo -e "\n";
0058 done