Final TOF DAs
[u/mrichter/AliRoot.git] / PWGLF / PROOF-INF.PWGLFforward2 / SETUP.C
1 void SETUP() {
2   CheckLoadLibrary("libPWGLFforward2");
3
4   // Set the include paths
5   gROOT->ProcessLine(".include PWGLFforward2/FORWARD/analysis2");
6
7   // Set our location, so that other packages can find us
8   gSystem->Setenv("PWGLFforward2_INCLUDE", "PWGLFforward2/FORWARD/analysis2");
9 }
10
11 Int_t CheckLoadLibrary(const char* library) {
12   // checks if a library is already loaded, if not loads the library
13
14   if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
15     return 1;
16   // Make sure current directory is in the load path so we load the right 
17   // library in case the target library already exist on the system (ProofLite)
18   gSystem->SetDynamicPath(Form("%s:%s", gSystem->WorkingDirectory(), 
19                                gSystem->GetDynamicPath()));
20   
21   return gSystem->Load(library);
22 }