Possibility to extact time stamp from SDD calibration objects (useful to monitor...
[u/mrichter/AliRoot.git] / MONITOR / onlineReco.sh
CommitLineData
5bea0f92 1#!/bin/bash
2
3source ~/.bashrc
4
5export BASE_DIR=/home/offline/onlineReco
6export RECO_DIR=$BASE_DIR/reco
7
8## enabling core dumps
9ulimit -c 100000000000000
10
11#----------------------------------------------------------------------
12# check that no other instances of online reconstruction are running at the same time!
13
14PIDFILE=$BASE_DIR/current.pid
15if [ -f $PIDFILE ]
16then
17 OLDPID=`cat $PIDFILE`
18 echo "Lock file $PIDFILE found. Checking process $OLDPID"
19 kill -0 $OLDPID
20 pidcheck=$?
21 if [ "$pidcheck" -eq "1" ]
22 then
23 echo "Process $OLDPID done, removing file"
24 rm -f $PIDFILE
25 else
26 echo "Process $OLDPID still running, exiting now!"
27 exit 0;
28 fi
29fi
30
31PROCNAME=`basename $0`
32CURPID=`pgrep $PROCNAME`
33echo "current process pid = " $CURPID
34echo $CURPID > $PIDFILE
35
36cd $BASE_DIR
37
38#------------------------------------------------------------------------
39# init GRID environment
40
41echo; echo 'Init GRID environment...'
42#root_alien_setup
43
44#------------------------------------------------------------------------
45# Setting environment
46
47echo;
48
49export BUILD_DIR=$BASE_DIR/build
50source $BUILD_DIR/SetAliRoot.sh
51
52echo;
53
54echo Root is: `root-config --version`
55echo AliRoot is: `aliroot --version`
56echo;
57
58cd $BASE_DIR
59
60if [ ! -e $RECO_DIR/log ]
61then
62 mkdir $RECO_DIR/log
63fi
64
65while [ 1 ]
66do
67 cd $RECO_DIR/log
68 aliroot -q $ALICE_ROOT/MONITOR/onlineReco.C\(\"listen\",\"$ALICE_ROOT/test/cosmic/rec.C\"\) | tee rec.log
69# mv rec.log log/run%%_rec.log
70done
71
72cd $BASE_DIR
73
74# remove lock file
75rm -f $PIDFILE
76
77exit 0
78
79