]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/sim/merge.sh
Merge branch 'feature-movesplit'
[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 Content of directory
15 `ls -al`
16 =========================================
17 EOF
18
19 which=$1
20 run=$2
21 dir=$3
22 stage=$4
23 counter=$5
24
25 cat <<EOF
26 Merge $which Stage $stage sub-job $counter 
27   Directory: $dir
28   Run:       $run
29 EOF
30
31 if test ! -f ${which}.C ; then 
32     echo "No ${which}.C found in current directory" \
33         > validation_error.message
34     exit 1
35 fi 
36 ARG="${which}.C($run,\"$dir\",$stage)"
37 echo "Running aliroot -b -q -x $ARG"
38 time aliroot -b -q -x $ARG
39 exitcode=$?
40
41 echo "======== $ARG finished with exit code: $exitcode ========"
42 echo "############## memory after: ##############"
43 free -m
44 if [ $exitcode -ne 0 ]; then
45     echo "$ARG exited with code $exitcode" > validation_error.message
46 fi
47
48 exit $exitcode
49 #
50 # EOF
51 #