]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/sim/merge.sh
ATO-58 digitization and hit creation in anohter loop (to take into account properly...
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / sim / merge.sh
1 #!/bin/bash
2
3 export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
4 cat <<EOF
5 =========================================
6 PATH=$PATH
7 LD_LIBRARY_PATH=$LD_LIBRARY_PATH
8 ROOTSYS=$ROOTSYS
9 `which root`
10 ALICE_ROOT=$ALICE_ROOT
11 `which aliroot`
12 `ulimit -a`
13 `free -m`
14 =========================================
15 EOF
16
17 which=$1
18 run=$2
19 dir=$3
20 stage=$4
21 counter=$5
22
23 cat <<EOF
24 Merge $which Stage $stage sub-job $counter 
25   Directory: $dir
26   Run:       $run
27 EOF
28
29 if test ! -f ${which}.C ; then 
30     echo "No ${which}.C found in current directory" \
31         > validation_error.message
32     exit 1
33 fi 
34 ARG="${which}.C($run,\"$dir\",$stage)"
35 time aliroot -b -q -x $ARG
36 exitcode=$?
37
38 echo "======== $ARG finished with exit code: $exitcode ========"
39 echo "############## memory after: ##############"
40 free -m
41 if [ $exitcode -ne 0 ]; then
42     echo "$ARG exited with code $exitcode" > validation_error.message
43 fi
44
45 exit $exitcode
46 #
47 # EOF
48 #