Adding the needed files for the compilation of the PWG2.par
authorpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Jan 2007 08:06:23 +0000 (08:06 +0000)
committerpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Jan 2007 08:06:23 +0000 (08:06 +0000)
PWG2/PROOF-INF.PWG2/BUILD.sh [new file with mode: 0755]
PWG2/PROOF-INF.PWG2/SETUP.C [new file with mode: 0644]

diff --git a/PWG2/PROOF-INF.PWG2/BUILD.sh b/PWG2/PROOF-INF.PWG2/BUILD.sh
new file mode 100755 (executable)
index 0000000..8220f95
--- /dev/null
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+touch libPWG2ebye.pkg
+touch libPWG2flow.pkg
+
+make libPWG2.so
diff --git a/PWG2/PROOF-INF.PWG2/SETUP.C b/PWG2/PROOF-INF.PWG2/SETUP.C
new file mode 100644 (file)
index 0000000..3537610
--- /dev/null
@@ -0,0 +1,26 @@
+void SETUP() {
+  // Load some ROOT libraries
+  CheckLoadLibrary("libEG");
+  CheckLoadLibrary("libGeom");
+  
+  // Load the ESD library
+  CheckLoadLibrary("libESD");
+
+  // Load the PWG2 library
+  CheckLoadLibrary("libPWG2");
+
+  // Set the include paths
+  gROOT->ProcessLine(".include PWG2");
+
+  // Set our location, so that other packages can find us
+  gSystem->Setenv("PWG2_INCLUDE", "PWG2");
+}
+
+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);
+}