Updating the functionality of AliAnalysisHadEtCorrections to accomodate centrality...
[u/mrichter/AliRoot.git] / prod / LHC09a1 / validation.sh
CommitLineData
afea418a 1#!/bin/sh
2##################################################
3validateout=`dirname $0`
4validatetime=`date`
5validated="0";
6error=1
7if [ -z $validateout ]
8then
9 validateout="."
10fi
11
12cd $validateout;
13validateworkdir=`pwd`;
14
15echo "*******************************************************" >> stdout;
16echo "* AliRoot Validation Script V1.0 *" >> stdout;
17echo "* Time: $validatetime " >> stdout;
18echo "* Dir: $validateout" >> stdout;
19echo "* Workdir: $validateworkdir" >> stdout;
20echo "* ----------------------------------------------------*" >> stdout;
21ls -la ./ >> stdout;
22echo "* ----------------------------------------------------*" >> stdout;
23
24##################################################
25if [ -f rec.log ] && [ -f sim.log ] && [ -f check.log ] && [ -f tag.log ]
26then
27sv=`grep -i "Segmentation violation" *.log`
28if [ "$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
64fi
65else
66 echo "* ########## Job not validated - no rec.log or sim.log or check.log ###" >> stdout;
67fi
68if [ "$error" = "1" ]
69 then
70 echo "* ################ Job not validated ################" >> stdout;
71fi
72echo "* ----------------------------------------------------*" >> stdout;
73echo "*******************************************************" >> stdout;
74sleep 15;
75cd -
76exit $error
77