allowing other root versions for acr reco
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Nov 2009 09:54:02 +0000 (09:54 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Nov 2009 09:54:02 +0000 (09:54 +0000)
prod/acrcaf/rec.sh
prod/acrcaf/reco/run.C

index 99b3a54..d70f5f2 100755 (executable)
@@ -32,12 +32,45 @@ else
     shift
   fi
 
+  CAFROOT=v5-24-00b-caf
+  BASE=
+  
+  if [ "$1" == "-ALICE_pro" ]
+  then
+    shift
+    CAFROOT=ALICE_pro
+    BASE=/afs/cern.ch/alice/library/afs_volumes/vol12
+  fi
+
+  if [ "$1" == "-ALICE_new" ]
+  then
+    shift
+    CAFROOT=ALICE_new
+    BASE=/afs/cern.ch/alice/library/afs_volumes/vol02
+  fi
+
+  if [ ! -z $BASE ]
+  then
+    echo "Setting ROOT and AliRoot to $CAFROOT"    
+
+    export ROOTSYS=$BASE/root
+    export PATH=$ROOTSYS/bin:$PATH
+    export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
+
+    export ALICE_ROOT=$BASE/AliRoot
+    export ALICE_TARGET=`root-config --arch`
+    export LD_LIBRARY_PATH=$ALICE_ROOT/lib/tgt_${ALICE_TARGET}:$LD_LIBRARY_PATH
+    export PATH=$ALICE_ROOT/bin/tgt_${ALICE_TARGET}:$PATH
+  fi 
+
   [ -z $1 ] && { echo "Usage: rec.sh [-local] <run_number>"; exit 1; }
 
   nev=${2:-10000}
   fev=${3:-0}
 
   cd reco
-  aliroot -q run.C\($1,$nev,$fev\)
+  aliroot -q run.C\($1,$nev,$fev,\"$CAFROOT\"\)
 
 fi
index b43a8ef..79cdb7b 100644 (file)
@@ -1,8 +1,9 @@
-void run(Int_t runNumber,Int_t nev=10000, Int_t firstev=0)
+void run(Int_t runNumber, Int_t nev = 10000, Int_t firstev = 0, const char* rootVersion = 0)
 {
   gEnv->SetValue("XSec.GSI.DelegProxy","2");
   // Select ROOT version
-  TProof::Mgr("aliprod@alicecaf")->SetROOTVersion("v5-24-00b-caf");
+  if (rootVersion)
+    TProof::Mgr("aliprod@alicecaf")->SetROOTVersion(rootVersion);
   // Login to CAF
   TProof::Open("aliprod@alicecaf");