]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/Compile.C
Added event inspector and energy distribution fitter.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / Compile.C
CommitLineData
7e4038b5 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 *
14 * @ingroup pwg2_forward_analysis_scripts
15 */
16Bool_t
17Compile(const char* script, Option_t* option="g")
18{
19 if (!script || script[0] == '\0') {
20 std::cerr << "No script to compile!" << std::endl;
21 return kFALSE;
22 }
23 gSystem->Load("libANALYSIS.so");
24 gSystem->Load("libANALYSISalice.so");
25 gSystem->Load("libPWG2forward2.so");
26 TString macroPath(gROOT->GetMacroPath());
27 macroPath.Append(":${ALICE_ROOT}/FMD/scripts");
28 gROOT->SetMacroPath(macroPath.Data());
29 gSystem->SetIncludePath("-I`root-config --incdir` "
30 "-I${ALICE_ROOT} "
31 "-I${ALICE_ROOT}/include "
32 "-I${ALICE_ROOT}/PWG2/FORWARD/analysis2 ");
33 Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option));
34 return ret == 0;
35}
36
37//____________________________________________________________________
38//
39// EOF
40//