1 //____________________________________________________________________
3 // $Id: Compile.C 30305 2008-12-09 05:45:53Z cholm $
5 // Script to compile (using ACLic) and load a script. It sets the
6 // include path to contain the relevant directories.
9 * Compile an FMD script using ACLic
11 * @param script Script to compile
12 * @param option Compile option
14 * @return true on success
16 * @ingroup pwglf_forward_scripts
19 Compile(const char* script, Option_t* option="g")
21 if (!script || script[0] == '\0') {
22 std::cerr << "No script to compile!" << std::endl;
25 gSystem->Load("libANALYSIS.so");
26 gSystem->Load("libANALYSISalice.so");
27 gSystem->Load("libPWGLFforward2.so");
28 TString macroPath(gROOT->GetMacroPath());
29 macroPath.Append(":${ALICE_ROOT}/PWGLF/FORWARD/analysis2");
30 macroPath.Append(":${ALICE_ROOT}/PWGLF/FORWARD/analysis2/scripts");
31 gROOT->SetMacroPath(macroPath.Data());
32 gSystem->SetIncludePath("-I`root-config --incdir` "
34 "-I${ALICE_ROOT}/include "
35 "-I${ALICE_ROOT}/PWGLF/FORWARD/analysis2 "
36 "-I${ALICE_ROOT}/PWGLF/FORWARD/analysis2 ");
37 Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option));
41 //____________________________________________________________________