]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/MUON/lite/LoadLibsForMuonQA.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGPP / MUON / lite / LoadLibsForMuonQA.C
1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 // ROOT includes
3 #include "TSystem.h"
4 #include "TROOT.h"
5 #include "TString.h"
6
7 #endif
8
9 //_____________________________
10 void LoadRootAnalysis()
11 {
12   gSystem->Load("libTree");
13   gSystem->Load("libGeom");
14   gSystem->Load("libVMC");
15   gSystem->Load("libPhysics");
16   gSystem->Load("libProof");
17 }
18
19 //_____________________________
20 void LoadAnalysis(const char* option = "")
21 {
22   gSystem->Load("libANALYSIS");
23   gSystem->Load("libOADB");
24   gSystem->Load("libANALYSISalice");
25   gSystem->Load("libCORRFW");
26   TString opt(option);
27   opt.ToUpper();
28   if ( opt.Contains("PWG") ) {
29     gSystem->Load("libPWGmuon");
30   }
31   if ( opt.Contains("PWGPP") ) {
32     gSystem->Load("libPWGPPMUONlite");
33   }
34 }
35
36 //_____________________________
37 void IncludeAliroot()
38 {
39   TString envList[3] = {"ALICE_ROOT","ALICE_INSTALL","ALICE_BUILD"};
40   for ( Int_t ienv=0; ienv<3; ienv++ ) {
41     if ( ! gSystem->Getenv(envList[ienv].Data()) ) continue;
42     if ( gSystem->AccessPathName(gSystem->ExpandPathName(Form("${%s}/include",envList[ienv].Data()))) ) continue;
43     gSystem->AddIncludePath(Form("-I${%s}/include",envList[ienv].Data()));
44   }
45 }
46
47 //_____________________________
48 void IncludeMuon()
49 {
50   gSystem->AddIncludePath("-I${ALICE_ROOT}/MUON");
51 }
52
53 //_____________________________
54 void LoadLibsForMuonQA ( const char* option )
55 {
56   TString opt(option);
57   opt.ToLower();
58   if ( opt.Contains("maketrend") ) {
59     IncludeAliroot();
60     gSystem->AddIncludePath("-I${ALICE_ROOT}/PWGPP/MUON/lite");
61     LoadRootAnalysis();
62     LoadAnalysis("PWGPP");
63   }
64   if ( opt.Contains("trigtrend") ) {
65     IncludeAliroot();
66     IncludeMuon();
67     LoadAnalysis("PWG");
68     gSystem->Load("libPWGmuondep");
69   }
70   if (opt.Contains("tracktrend") ) {
71     IncludeAliroot();
72     LoadAnalysis("PWG");
73   }
74 }