forked from alisw/AliDPG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAOD_merge.sh
executable file
·66 lines (50 loc) · 1.45 KB
/
AOD_merge.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
echo "========================================="
echo "############## PATH : ##############"
echo $PATH
echo "############## LD_LIBRARY_PATH : ##############"
echo $LD_LIBRARY_PATH
echo "############## ROOTSYS : ##############"
echo $ROOTSYS
echo "############## which root : ##############"
which root
echo "############## ALICE_ROOT : ##############"
echo $ALICE_ROOT
echo "############## which aliroot : ##############"
which aliroot
echo "############## system limits : ##############"
ulimit -a
echo "############## memory : ##############"
free -m
echo "========================================="
MACROPATH=""
### check environment
if [ "$ALIDPG_ROOT" = "" ]; then
if [ -f "alidpg.tgz" ]; then
echo "Using AliDPG from tarball"
tar zxvf alidpg.tgz
export ALIDPG_ROOT=AliDPG
else
echo "*! ERROR: ALIDPG_ROOT is not set!"
echo "ERROR: ALIDPG_ROOT is not set!" > validation_error.message
exit
fi
fi
for testPath in AODtrainRawAndMC.C $ALIDPG_ROOT/AOD/AODtrainRawAndMC.C; do
if [ -f "$testPath" ]; then
MACROPATH="$testPath"
break
fi
done
if [ -z "$MACROPATH" ]; then
echo "* No AOD macro was found"
exit 1
fi
time aliroot -b -q -x $MACROPATH\(1\)
exitcode=$?
echo "======== $MACROPATH finished with exit code: $exitcode ========"
if [ $exitcode -ne 0 ]; then
echo "$MACROPATH exited with code $exitcode" > validation_error.message
fi
exit $exitcode