PAR library for resonance package
authorpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 May 2008 09:01:39 +0000 (09:01 +0000)
committerpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 May 2008 09:01:39 +0000 (09:01 +0000)
PWG2/PROOF-INF.PWG2resonances/BUILD.sh [new file with mode: 0755]
PWG2/PROOF-INF.PWG2resonances/SETUP.C [new file with mode: 0644]

diff --git a/PWG2/PROOF-INF.PWG2resonances/BUILD.sh b/PWG2/PROOF-INF.PWG2resonances/BUILD.sh
new file mode 100755 (executable)
index 0000000..eddeaa1
--- /dev/null
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+touch libPWG2.pkg
+touch libPWG2resonances.pkg
+
+make libPWG2resonances.so
diff --git a/PWG2/PROOF-INF.PWG2resonances/SETUP.C b/PWG2/PROOF-INF.PWG2resonances/SETUP.C
new file mode 100644 (file)
index 0000000..b5e7981
--- /dev/null
@@ -0,0 +1,19 @@
+void SETUP() {
+  CheckLoadLibrary("libANALYSISalice");
+  CheckLoadLibrary("libPWG2resonances");
+
+  // Set the include paths
+  gROOT->ProcessLine(".include PWG2resonances");
+
+  // Set our location, so that other packages can find us
+  gSystem->Setenv("PWG2resonances_INCLUDE", "PWG2resonances");
+}
+
+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);
+}