25 const char opt[] = { (force ?
'+' : debug ?
'g' :
'\0'),
26 (force && debug ?
'g' :
'\0'),
'\0' };
27 if (verbose) Printf(
"Building %s ...",name);
29 Int_t ret = gROOT->LoadMacro(Form(
"%s.C+%s", name, opt), &error);
30 if (ret < 0 || error) {
31 Error(
"BuildScript",
"Failed to build %s: %d", error);
54 gSystem->AddIncludePath(
"-I$ALICE_ROOT/include");
55 gSystem->AddIncludePath(
"-I$ALICE_PHYSICS/include");
56 gSystem->AddIncludePath(
"-I$ALICE_PHYSICS/PWGLF/FORWARD/trains/");
57 gROOT->SetMacroPath(Form(
"%s:$ALICE_PHYSICS/PWGLF/FORWARD/trains",
58 gROOT->GetMacroPath()));
60 gSystem->Load(
"libANALYSISalice");
61 const char* scripts[] = {
"AvailableSoftware",
68 (all ?
"LocalRailway" : 0),
76 const char** ptr = scripts;
78 if (!
BuildScript(*ptr, verbose, force, debug))
return false;
92 std::cout <<
"Usage: .x RunTrain.C(NAME,CLASS,OPTIONS)\n\n"
93 <<
" NAME Name of train (free form)\n"
94 <<
" CLASS Name of class implementing TrainSetup\n"
95 <<
" OPTIONS Comma separated list of options\n"
115 if (name.IsNull() || name.EqualTo(
"help", TString::kIgnoreCase) ||
116 cls.IsNull() || cls.EqualTo(
"help", TString::kIgnoreCase) ||
122 Bool_t verb = opts.Contains(
"verbose");
127 if (!opts.EndsWith(
",")) opts.Append(
",");
129 opts.Append(uri.GetUrl());
Bool_t RunTrain(const TString &name, const TString &cls, const TUrl &uri, const TString &opts)
Bool_t BuildRailways(Bool_t verbose, Bool_t force, Bool_t debug, Bool_t all=false)
static Bool_t Main(const TString &name, const TString &cls, const TCollection *opts, Bool_t asProg=true, Bool_t spawn=false)
Bool_t BuildScript(const char *name, Bool_t verbose, Bool_t force, Bool_t debug)