OADBContainer moved to STEERBase
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 18 Jun 2011 13:02:05 +0000 (13:02 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 18 Jun 2011 13:02:05 +0000 (13:02 +0000)
OADB/CMakelibOADB.pkg
OADB/OADBLinkDef.h
STEER/AliOADBContainer.cxx [moved from OADB/AliOADBContainer.cxx with 93% similarity]
STEER/AliOADBContainer.h [moved from OADB/AliOADBContainer.h with 98% similarity]
STEER/CMakelibSTEERBase.pkg
STEER/STEERBaseLinkDef.h

index 62acafc..cd03881 100644 (file)
@@ -1,5 +1,5 @@
 #-*- Mode: CMake -*-
-set ( SRCS  AliOADBContainer.cxx AliOADBCentrality.cxx  AliOADBPWG2Spectra.cxx AliOADBPhysicsSelection.cxx AliOADBFillingScheme.cxx AliOADBTriggerAnalysis.cxx )
+set ( SRCS  AliOADBCentrality.cxx  AliOADBPWG2Spectra.cxx AliOADBPhysicsSelection.cxx AliOADBFillingScheme.cxx AliOADBTriggerAnalysis.cxx )
 
 string(REPLACE ".cxx" ".h" HDRS  "${SRCS}")
 
index 02fb20f..802d2d8 100644 (file)
@@ -9,7 +9,6 @@
 #pragma link off all functions;
  
 
-#pragma link C++ class AliOADBContainer+;
 #pragma link C++ class AliOADBCentrality+;
 #pragma link C++ class AliOADBPhysicsSelection+;
 #pragma link C++ class AliOADBFillingScheme+;
similarity index 93%
rename from OADB/AliOADBContainer.cxx
rename to STEER/AliOADBContainer.cxx
index ebc999b..64860c1 100644 (file)
@@ -29,7 +29,9 @@
 #include <TArrayI.h>
 #include <TFile.h>
 #include <TList.h>
-#include "TBrowser.h"
+#include <TBrowser.h>
+#include <TSystem.h>
+#include <TError.h>
 
 ClassImp(AliOADBContainer);
 
@@ -345,3 +347,19 @@ void AliOADBContainer::Browse(TBrowser *b)
       TObject::Browse(b);
 }
 
+//______________________________________________________________________________
+const char* AliOADBContainer::GetOADBPath()
+{
+// returns the path of the OADB
+// this static function just depends on environment variables
+
+   static TString oadbPath;
+
+   if (gSystem->Getenv("OADB_PATH"))
+      oadbPath = gSystem->Getenv("OADB_PATH");
+   else if (gSystem->Getenv("ALICE_ROOT"))
+      oadbPath.Form("%s/OADB", gSystem->Getenv("ALICE_ROOT"));
+   else
+   ::Fatal("AliAnalysisManager::GetOADBPath", "Cannot figure out AODB path. Define ALICE_ROOT or OADB_PATH!");
+   return oadbPath;
+}
similarity index 98%
rename from OADB/AliOADBContainer.h
rename to STEER/AliOADBContainer.h
index bde27e7..38e41b9 100644 (file)
@@ -50,6 +50,8 @@ class AliOADBContainer : public TNamed {
   virtual Bool_t       IsFolder() const { return kTRUE; }
   void Browse(TBrowser *b);
   Int_t GetIndexForRun(Int_t run) const;
+//
+  static const char*   GetOADBPath();
  private:
   Int_t HasOverlap(Int_t lower, Int_t upper) const;
  private :
index ac04108..390cc02 100644 (file)
@@ -68,6 +68,7 @@ set ( SRCS
     AliPIDCombined.cxx
     AliDAQ.cxx 
     AliRefArray.cxx
+    AliOADBContainer.cxx       
     )
 
 string(REPLACE ".cxx" ".h" HDRS  "${SRCS}")
index 14b60a8..e592a9c 100644 (file)
@@ -95,4 +95,6 @@
 #pragma link C++ class AliDAQ+;
 #pragma link C++ class AliRefArray+;
 
+#pragma link C++ class AliOADBContainer+;
+
 #endif