Fixing the PWG2femtoscopyUser PROOF-INF directory
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Apr 2008 14:06:55 +0000 (14:06 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Apr 2008 14:06:55 +0000 (14:06 +0000)
PWG2/PROOF-INF.PWG2femtoscopyUser/BUILD.sh [new file with mode: 0755]
PWG2/PROOF-INF.PWG2femtoscopyUser/SETUP.C [new file with mode: 0644]

diff --git a/PWG2/PROOF-INF.PWG2femtoscopyUser/BUILD.sh b/PWG2/PROOF-INF.PWG2femtoscopyUser/BUILD.sh
new file mode 100755 (executable)
index 0000000..747730e
--- /dev/null
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+touch libPWG2femtoscopyUser.pkg
+
+make libPWG2femtoscopyUser.so
diff --git a/PWG2/PROOF-INF.PWG2femtoscopyUser/SETUP.C b/PWG2/PROOF-INF.PWG2femtoscopyUser/SETUP.C
new file mode 100644 (file)
index 0000000..87208d6
--- /dev/null
@@ -0,0 +1,18 @@
+void SETUP() {
+  CheckLoadLibrary("libPWG2femtoscopyUser");
+  
+  // Set the include paths
+  gROOT->ProcessLine(".include PWG2femtoscopyUser");
+
+  // Set our location, so that other packages can find us
+  gSystem->Setenv("PWG2femtoscopyUser_INCLUDE", "PWG2femtoscopyUser/FEMTOSCOPY/AliFemtoUser");
+}
+
+Int_t CheckLoadLibrary(const char* library) {
+  // checks if a library is already loaded, if not loads the library
+
+  if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
+    return 1;
+  
+  return gSystem->Load(library);
+}