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 62acafc39c542c9b9cda3590a6cae371bf6a17f6..cd03881b901355b8d73e847e67fd65264d1ad223 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 02fb20f9c4b13084a15d97c7d028f64fc89094d7..802d2d8935d5c1e8781a2e62cfec9e3b547cc051 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 ebc999bf5096d2bd12d8f73d8ae29aa63ab52963..64860c163241db327283f8720cbb19d6625eeb4e 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 bde27e74ab725f70d628cdf28ff6722dea357468..38e41b91f70e8c3a3377c01ed6d7e5cc8c521d13 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 ac0410804b0a4b32349e09c51f38c7aedfe2b09d..390cc02f50da78c50607485989f54f49071423bd 100644 (file)
@@ -68,6 +68,7 @@ set ( SRCS
     AliPIDCombined.cxx
     AliDAQ.cxx 
     AliRefArray.cxx
+    AliOADBContainer.cxx       
     )
 
 string(REPLACE ".cxx" ".h" HDRS  "${SRCS}")
index 14b60a8355852cc466df4e592f1cbdf0c267ff7d..e592a9c30bdec359afaa03d3a975d17006c3038c 100644 (file)
@@ -95,4 +95,6 @@
 #pragma link C++ class AliDAQ+;
 #pragma link C++ class AliRefArray+;
 
+#pragma link C++ class AliOADBContainer+;
+
 #endif