]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Minor improvements
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 Aug 2009 16:47:23 +0000 (16:47 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 Aug 2009 16:47:23 +0000 (16:47 +0000)
MONITOR/onlineReco.C
MONITOR/onlineReco.sh

index 4d6927d15d819496a5d380b77871c567ee7a8904..18cd69374c6e9f5646e7b6209ffee143f7d90067 100644 (file)
@@ -10,6 +10,7 @@ UInt_t onlineReco(const char* param = "listen",const char *recMacroPath = "$ALIC
   if (paramStr.IsDigit()) {
     run = paramStr.Atoi();
   } else if (paramStr == "listen") {
+    gSystem->Load("libMONITOR");
     AliOnlineRecoTrigger trigger;
     run = trigger.Run();
   } else {
@@ -54,7 +55,6 @@ UInt_t onlineReco(const char* param = "listen",const char *recMacroPath = "$ALIC
       else {
        cout << "No GDCs defined in the logbook entry for run " << run << endl;
       }
-      delete gdcs;
     }
   }
 
index eb92b597b1940bceaafd71bf8f894c54f6743294..be14e5cfdab0e5a26e4e27d07c12d2aaf62d1fc4 100644 (file)
@@ -2,7 +2,7 @@
 
 source ~/.bashrc
 
-export BASE_DIR=/home/offline/onlineReco
+export BASE_DIR=/local/home/offline/onlineReco
 export RECO_DIR=$BASE_DIR/reco
 
 ## enabling core dumps
@@ -33,12 +33,10 @@ CURPID=`pgrep $PROCNAME`
 echo "current process pid = " $CURPID 
 echo $CURPID > $PIDFILE
 
-cd $BASE_DIR
-
 #------------------------------------------------------------------------
 # init GRID environment
 
-echo; echo 'Init GRID environment...'
+#echo; echo 'Init GRID environment...'
 #root_alien_setup
 
 #------------------------------------------------------------------------
@@ -47,27 +45,35 @@ echo; echo 'Init GRID environment...'
 echo;
 
 export BUILD_DIR=$BASE_DIR/build
-source $BUILD_DIR/SetAliRoot.sh
+source $BUILD_DIR/setenv.sh
+source /opt/date/setup.sh
+source /opt/dim/setup.sh
 
 echo;
-
 echo Root is: `root-config --version`
 echo AliRoot is: `aliroot --version`
 echo;
 
-cd $BASE_DIR
-
 if [ ! -e $RECO_DIR/log ]
 then
-       mkdir $RECO_DIR/log
+       mkdir -p $RECO_DIR/log
 fi
 
-while [ 1 ] 
-do
-    cd $RECO_DIR/log
-    aliroot -q $ALICE_ROOT/MONITOR/onlineReco.C\(\"listen\",\"$ALICE_ROOT/test/cosmic/rec.C\"\) | tee rec.log
-#    mv rec.log log/run%%_rec.log
-done
+if [ ! $1 ]
+then
+    while [ 1 ] 
+      do
+      cd $RECO_DIR
+      aliroot -q $ALICE_ROOT/MONITOR/onlineReco.C\(\"listen\",\"$ALICE_ROOT/test/cosmic/rec.C\"\) | tee rec.log
+         RUNNUMBER=`grep "I-AliCDBManager::Print: Run number =" rec.log | cut -d ";" -f 1 | awk '{print $5}'`
+         mv rec.log log/run$RUNNUMBER.log
+    done
+else
+      cd $RECO_DIR
+      aliroot -q $ALICE_ROOT/MONITOR/onlineReco.C\(\"$1\",\"$ALICE_ROOT/test/cosmic/rec.C\"\) | tee rec.log
+         RUNNUMBER=`grep "I-AliCDBManager::Print: Run number =" rec.log | cut -d ";" -f 1 | awk '{print $5}'`
+         mv rec.log log/run$RUNNUMBER.log
+fi
 
 cd $BASE_DIR