Script to do per-strip spectra
[u/mrichter/AliRoot.git] / FMD / scripts / Compile.C
CommitLineData
bf000c32 1//____________________________________________________________________
a1f80595 2//
3// $Id$
4//
5// Script to compile (using ACLic) and load a script. It sets the
6// include path to contain the relevant directories.
7//
9b48326f 8/** @defgroup FMD_script Scripts
9 @brief Scripts for the FMD
10*/
11/** @defgroup simple_script Simple scripts
12 @ingroup FMD_script
13 @brief Scripts for the FMD
14*/
15/** Compile an FMD script using ACLic
16 @param script Script to compile
17 @param option Compile option
18 @ingroup FMD_script
19*/
9b98d361 20Bool_t
8f6ee336 21Compile(const char* script, Option_t* option="g")
a1f80595 22{
9b98d361 23 if (!script || script[0] == '\0') {
24 std::cerr << "No script to compile!" << std::endl;
25 return kFALSE;
26 }
83ad576a 27 gSystem->Load("libANALYSIS.so");
28 gSystem->Load("libANALYSISalice.so");
a1f80595 29 gSystem->Load("libFMDutil.so");
9b98d361 30 gSystem->Load("libFMDflow.so");
31 TString macroPath(gROOT->GetMacroPath());
32 macroPath.Append(":${ALICE_ROOT}/FMD/scripts");
33 gROOT->SetMacroPath(macroPath.Data());
a1f80595 34 gSystem->SetIncludePath("-I`root-config --incdir` "
a9579262 35 "-I${ALICE_ROOT} "
a1f80595 36 "-I${ALICE_ROOT}/include "
37 "-I${ALICE_ROOT}/FMD "
38 "-I${ALICE_ROOT}/geant3/TGeant3");
9b98d361 39 Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option));
40 return ret == 0;
a1f80595 41}
42
43//____________________________________________________________________
44//
45// EOF
46//