]>
Commit | Line | Data |
---|---|---|
35e96462 | 1 | //____________________________________________________________________ |
2 | // | |
3 | // $Id: Compile.C 30305 2008-12-09 05:45:53Z cholm $ | |
4 | // | |
5 | // Script to compile (using ACLic) and load a script. It sets the | |
6 | // include path to contain the relevant directories. | |
7 | // | |
8 | /** | |
9 | * Compile an FMD script using ACLic | |
10 | * | |
11 | * @param script Script to compile | |
12 | * @param option Compile option | |
13 | * | |
95c09e1c | 14 | * @return true on success |
15 | * | |
bd6f5206 | 16 | * @ingroup pwglf_forward_scripts |
35e96462 | 17 | */ |
18 | Bool_t | |
19 | Compile(const char* script, Option_t* option="g") | |
20 | { | |
21 | if (!script || script[0] == '\0') { | |
22 | std::cerr << "No script to compile!" << std::endl; | |
23 | return kFALSE; | |
24 | } | |
4070f709 | 25 | gSystem->Load("libANALYSIS"); |
26 | gSystem->Load("libANALYSISalice"); | |
27 | gSystem->Load("libPWGLFforward2"); | |
35e96462 | 28 | TString macroPath(gROOT->GetMacroPath()); |
bd6f5206 | 29 | macroPath.Append(":${ALICE_ROOT}/PWGLF/FORWARD/analysis2"); |
30 | macroPath.Append(":${ALICE_ROOT}/PWGLF/FORWARD/analysis2/scripts"); | |
35e96462 | 31 | gROOT->SetMacroPath(macroPath.Data()); |
32 | gSystem->SetIncludePath("-I`root-config --incdir` " | |
33 | "-I${ALICE_ROOT} " | |
34 | "-I${ALICE_ROOT}/include " | |
c9ed5054 | 35 | "-I${ALICE_ROOT}/PWGLF/FORWARD/analysis2 " |
fe218435 | 36 | "-I${ALICE_ROOT}/PWGLF/FORWARD/analysis2 "); |
35e96462 | 37 | Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option)); |
38 | return ret == 0; | |
39 | } | |
40 | ||
41 | //____________________________________________________________________ | |
42 | // | |
43 | // EOF | |
44 | // |