1 //____________________________________________________________________
5 // Script to compile (using ACLic) and load a script. It sets the
6 // include path to contain the relevant directories.
8 /** @defgroup FMD_script Scripts
9 @brief Scripts for the FMD
11 /** @defgroup simple_script Simple scripts
13 @brief Scripts for the FMD
15 /** Compile an FMD script using ACLic
16 @param script Script to compile
17 @param option Compile option
21 AddInclude(const char* what)
23 TString path(gSystem->GetIncludePath());
24 if (path.Contains(what)) return;
25 gSystem->AddIncludePath(what);
28 Compile(const char* script=0, Option_t* option="g")
30 if (!script || script[0] == '\0') {
31 std::cerr << "No script to compile!" << std::endl;
34 gSystem->Load("libANALYSIS.so");
35 gSystem->Load("libANALYSISalice.so");
36 gSystem->Load("libFMDutil.so");
37 TString macroPath(gROOT->GetMacroPath());
38 macroPath.Append(":${ALICE_ROOT}/FMD/scripts");
39 gROOT->SetMacroPath(macroPath.Data());
40 AddInclude("-I`root-config --incdir`");
41 AddInclude("-I${ALICE_ROOT}");
42 AddInclude("-I${ALICE_ROOT}/include");
43 AddInclude("-I${ALICE_ROOT}/FMD");
44 AddInclude("-I${ALICE_ROOT}/geant3/TGeant3");
45 AddInclude("-I${ALICE_ROOT}/../trunk");
46 AddInclude("-I${ALICE_ROOT}/../trunk/FMD");
47 AddInclude("-I${ALICE_ROOT}/../trunk/RAW");
48 Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option));
52 //____________________________________________________________________