]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ESDCheck/CheckESD.sh
- removed some histograms, namely (also for HLT) as these are not used anyway: (Hege)
[u/mrichter/AliRoot.git] / ESDCheck / CheckESD.sh
CommitLineData
e904c42b 1#!/bin/bash
2currentDir=`pwd`
3PACKAGES="ESD ANALYSIS AnalysisCheck"
4DETECTORS="PHOS EMCal PMD HMPID T0 MUON TOF VZERO"
5LOGFILE=`echo $0 | sed -e 's/sh/log/'`
6function testpack()
7{
8 test=`cat CheckESD.log | grep "$2 done"`
9 if [ "$test" = "" ]; then
10 echo --ERROR $1 $2
11 rv=1
12 else
13 echo ++OK $1 $2
14 rv=0
15 fi
16 return $rv
17}
18function testdet()
19{
20 test=`cat CheckESD.log | grep "$2 Summary Report: OK"`
21 if [ "$test" = "" ]; then
22 echo --ERROR $1 $2
23 rv=1
24 else
25 echo ++OK $1 $2
26 rv=0
27 fi
28 return $rv
29}
30#Start
31if [ -e $LOGFILE ]; then
32 rm $LOGFILE
33fi
34echo $0 LOG > $LOGFILE
35# make the par files
36cd $ALICE_ROOT
37for pack in $PACKAGES; do
38 make $pack.par >> $currentDir/$LOGFILE
39done
40# copy the par file to the working directory
41cd $currentDir
42for pack in $PACKAGES; do
43 rm -fr $pack*
44 mv $ALICE_ROOT/$pack.par .
45done
46cp $ALICE_ROOT/ESDCheck/ana.C .
47# run root
48if [ ! -e "AliESDs.root" ]; then
49 echo File AliESDs.root not found >> $LOGFILE
50 exit 1
51fi
52root -b -q ana.C >> $LOGFILE 2>&1
53#test function for parsing log file
54# parse the log file
55error=0
56for pack in $PACKAGES; do
57 testpack creating $pack.par
58 testpack loading lib$pack
59 let "error +=$?"
60done
61
62for det in $DETECTORS; do
63 testdet Checking $det
64 let "error +=$?"
65done
66if [ "$error" > "0" ]; then
67 echo --------------- $error errors signaled
68else
69 echo +++++++++++++++ All OK
70fi
71exit $error
72