Update master to aliroot
[u/mrichter/AliRoot.git] / test / QA / simrun.sh
CommitLineData
0fb1bd0c 1#!/bin/sh -f
2if ! [ "$1" ]
3then
4 echo "Usage: simrun.sh RunNumber";
5 exit;
6fi
7
8# Working directory
9if [ ${WORK}"x" == "x" ]
10then
11 export WORK=./;
12fi
13cd ${WORK};
14
15# Version
16if [ ${VERSION}"x" == "x" ]
17then
18 export VERSION=UNKNOWN;
19fi
65aa1f4d 20echo $WORK $VERSION
0fb1bd0c 21
22# Test directory
23if ! [ -e QATest/$VERSION ]
24then
25 mkdir -p QATest/$VERSION;
26fi
27cd QATest/$VERSION;
28
29# Cleanup and (re)link
30rm -rf *.root *.C *.log data;
31ln -sf $ALICE_ROOT/test/QA/Config.C Config.C;
32ln -sf $ALICE_ROOT/test/QA/sim.C sim.C;
33ln -sf $ALICE_ROOT/test/QA/simqa.C simqa.C;
34ln -sf $ALICE_ROOT/test/QA/rec.C rec.C;
35ln -sf $ALICE_ROOT/test/QA/recqa.C recqa.C;
36
37# Process MC
38root -b -q $ALICE_ROOT/test/QA/simrun.C --run $1;
39
40# Directory for RAW data
41if [ ! -e data ]
42then
43 mkdir data;
44fi
45cd data;
46
47# Cleanup and (re)link
48rm -rf *.root *.C *.log;
49ln -sf ../raw.root;
50ln -sf $ALICE_ROOT/test/QA/recraw.C recraw.C;
51cp -f $ALICE_ROOT/test/QA/rawqa.C .;
52
53# Process RAW
54aliroot -b -q recraw.C > recraw.log ;
55if ! [ ${GSHELL_ROOT}"x" == "x" ] # Check that the AliEn API is available
56then
55420306 57aliroot -b > rawqa.log << EOF
a6fbea2b 58.x $ALICE_ROOT/test/QA/rootlogon.C
d0992318 59.L rawqa.C++
fd8c26f1 60rawqa($1, 10)
a6fbea2b 61EOF
0fb1bd0c 62fi
63exit;