proof package support for OADB
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jan 2011 14:12:07 +0000 (14:12 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jan 2011 14:12:07 +0000 (14:12 +0000)
ANALYSIS/AliAnalysisManager.cxx
ANALYSIS/AliAnalysisManager.h
OADB/PROOF-INF/BUILD.sh [new file with mode: 0755]
OADB/PROOF-INF/SETUP.C [new file with mode: 0644]

index e62b54d..538740f 100644 (file)
@@ -2375,3 +2375,21 @@ void AliAnalysisManager::WriteStatisticsMsg(Int_t nevents)
    }   
    out.close();
 }
+
+//______________________________________________________________________________
+const char* AliAnalysisManager::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
+      cout << "ERROR: Cannot figure out AODB path. Define ALICE_ROOT or OADB_PATH!" << endl;
+      
+   return oadbPath;
+}
index 990f65b..7190b6a 100644 (file)
@@ -184,6 +184,8 @@ enum EAliAnalysisFlags {
    void                 WriteStatisticsMsg(Int_t nevents);
    Int_t                GetNcalls() const {return fNcalls;}
    Bool_t               ValidateOutputFiles() const;
+   
+   static const char*   GetOADBPath();
 
 protected:
    void                 ImportWrappers(TList *source);
diff --git a/OADB/PROOF-INF/BUILD.sh b/OADB/PROOF-INF/BUILD.sh
new file mode 100755 (executable)
index 0000000..a8b7c3e
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+
diff --git a/OADB/PROOF-INF/SETUP.C b/OADB/PROOF-INF/SETUP.C
new file mode 100644 (file)
index 0000000..bf8ce48
--- /dev/null
@@ -0,0 +1,5 @@
+void SETUP()
+{
+   // Set our location, so that other packages can find us
+   gSystem->Setenv("OADB_PATH", "OADB");
+}