.so cleanup: no .so ext to GetLibraries()
[u/mrichter/AliRoot.git] / PWGUD / PROOF-INF.PWGUDbase / SETUP.C
1 void SETUP()
2 {
3    // Load some ROOT libraries
4    CheckLoadLibrary("libEG");
5    CheckLoadLibrary("libGeom");
6
7    // Load the ESD library
8   CheckLoadLibrary("libANALYSIS");
9   CheckLoadLibrary("libESD");
10   CheckLoadLibrary("libPWGUDbase");
11
12
13    // Set the include paths
14    gROOT->ProcessLine(".include PWGUDbase/base");
15
16    // Set our location, so that other packages can find us
17    gSystem->Setenv("PWGUDbase_INCLUDE", "PWGUDbase/base");
18
19    TString lib = TString::Format("-L%s -lPWGUDbase", gSystem->WorkingDirectory());
20    gSystem->Setenv("PWGUDbase_LIBS", lib.Data());
21 }
22
23 Int_t CheckLoadLibrary(const char* library)
24 {
25   // checks if a library is already loaded, if not loads the library
26
27   if (strlen(gSystem->GetLibraries(library, "", kFALSE)) > 0)
28     return 1;
29
30   return gSystem->Load(library);
31 }