Jet Jet Production 3 p_T hard bins
[u/mrichter/AliRoot.git] / prod / LHC09a1 / validation.sh
1 #!/bin/sh
2 ##################################################
3 validateout=`dirname $0`
4 validatetime=`date`
5 validated="0";
6 error=1
7 if [ -z $validateout ]
8 then
9     validateout="."
10 fi
11
12 cd $validateout;
13 validateworkdir=`pwd`;
14
15 echo "*******************************************************" >> stdout;
16 echo "* AliRoot Validation Script V1.0                      *" >> stdout;
17 echo "* Time:    $validatetime " >> stdout;
18 echo "* Dir:     $validateout" >> stdout;
19 echo "* Workdir: $validateworkdir" >> stdout;
20 echo "* ----------------------------------------------------*" >> stdout;
21 ls -la ./ >> stdout;
22 echo "* ----------------------------------------------------*" >> stdout;
23
24 ##################################################
25 if [ -f rec.log ] && [ -f sim.log ] && [ -f check.log ] && [ -f tag.log ]
26 then
27 sv=`grep -i  "Segmentation violation" *.log`
28 if [ "$sv" = "" ]
29     then
30     sf=`grep -i  "Segmentation fault" *.log`
31     if [ "$sf" = "" ]
32         then
33         be=`grep -i  "Bus error" *.log`
34         if [ "$be" = "" ]
35             then
36             ab=`grep -i "Abort" *.log`
37             if [ "$ab" = "" ]
38                 then
39                 fp=`grep -i  "Floating point exception" *.log`
40                 if [ "$fp" = "" ]
41                     then
42                     kl=`grep -i  "Killed" *.log`
43                     if [ "$kl" = "" ]
44                         then
45                         bf=`grep -i "busy flag cleared" *.log`
46                         if [ "$bf" = "" ]
47                            then
48                            ch=`grep -i "check of ESD was successfull" check.log`
49                            if [ "$ch" = "" ]
50                            then
51                                 echo "* #  The ESD was not successfully checked   *"  >>stdout;
52                            else
53                                 echo "* ----------------   Job Validated  ------------------*" >> stdout;
54                                 error="0";
55                            fi
56                         else
57                             echo "* #             Check Macro failed !                  #" >> stdout;
58                         fi;
59                     fi;
60                 fi
61             fi
62         fi
63     fi
64 fi
65 else
66     echo "* ########## Job not validated - no rec.log or sim.log or check.log ###" >> stdout;
67 fi
68 if [ "$error" = "1" ]
69     then
70     echo "* ################   Job not validated ################" >> stdout;
71 fi
72 echo "* ----------------------------------------------------*" >> stdout;
73 echo "*******************************************************" >> stdout;
74 sleep 15;
75 cd -
76 exit $error
77