AliPhysics  e34b7ac (e34b7ac)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Compile.C
Go to the documentation of this file.
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 //
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  }
25  gSystem->Load("libANALYSIS");
26  gSystem->Load("libANALYSISalice");
27  gSystem->Load("libPWGLFforward2");
28  TString macroPath(gROOT->GetMacroPath());
29  macroPath.Append(":${ALICE_PHYSICS}/PWGLF/FORWARD/analysis2");
30  macroPath.Append(":${ALICE_PHYSICS}/PWGLF/FORWARD/analysis2/scripts");
31  gROOT->SetMacroPath(macroPath.Data());
32  gSystem->SetIncludePath("-I`root-config --incdir` "
33  "-I${ALICE_PHYSICS} "
34  "-I${ALICE_PHYSICS}/include "
35  "-I${ALICE_PHYSICS}/PWGLF/FORWARD/analysis2 "
36  "-I${ALICE_PHYSICS}/PWGLF/FORWARD/analysis2 ");
37  Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option));
38  return ret == 0;
39 }
40 
41 //____________________________________________________________________
42 //
43 // EOF
44 //
TSystem * gSystem
Bool_t Compile(const char *script, Option_t *option="g")
Definition: Compile.C:19
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53