# Lines that do not start with #Module are ignored, except those in embedded
macro blocks
#Module.Begin QAsym
-#Module.Libs PWG1
+#Module.Libs PWGPP
#Module.Deps PhysicsSelection
#Module.DataTypes ESD, AOD, MC
-#Module.MacroName $ALICE_ROOT/PWG1/PilotTrain/AddTaskQAsym.C
+#Module.MacroName $ALICE_ROOT/PWGPP/PilotTrain/AddTaskQAsym.C
#Module.MacroArgs 0, AliVEvent::kAnyINT, AliVEvent::kHighMult, AliVEvent::kEMC7, AliVEvent::kMUU7
+#Module.OutputFile
+#Module.TerminateFile
#Module.StartConfig
__R_ADDTASK__->SelectCollisionCandidates();
#Module.EndConfig
// the right order in the grid handler to generate train macros.
+using std::cout;
+using std::endl;
+using std::ios;
+using std::ofstream;
+using std::ifstream;
ClassImp(AliAnalysisTaskCfg)
//______________________________________________________________________________
fLibs(),
fDeps(),
fDataTypes(),
+ fOutputFile(),
+ fTerminateFile(),
fMacro(0),
fConfigDeps(0),
fRAddTask(0)
fLibs(),
fDeps(),
fDataTypes(),
+ fOutputFile(),
+ fTerminateFile(),
fMacro(0),
fConfigDeps(0),
fRAddTask(0)
fLibs(other.fLibs),
fDeps(other.fDeps),
fDataTypes(other.fDataTypes),
+ fOutputFile(other.fOutputFile),
+ fTerminateFile(other.fTerminateFile),
fMacro(0),
fConfigDeps(0),
fRAddTask(0)
fLibs = other.fLibs;
fDeps = other.fDeps;
fDataTypes = other.fDataTypes;
+ fOutputFile = other.fOutputFile;
+ fTerminateFile = other.fTerminateFile;
if (other.fMacro) fMacro = new TMacro(*other.fMacro);
if (other.fConfigDeps) fConfigDeps = new TMacro(*other.fConfigDeps);
fRAddTask = other.fRAddTask;
Error("ExecuteConfigMacro", "Cannot load requested libraries: %s", fLibs.Data());
return -1;
}
- return fConfigDeps->Exec();
+ Int_t error = 0;
+ Long64_t retval = fConfigDeps->Exec("", &error);
+ if (error != TInterpreter::kNoError)
+ {
+ Error("ExecuteMacro", "Macro interpretation failed");
+ return -1;
+ }
+ return retval;
}
//______________________________________________________________________________
out << "#Module.Libs " << fLibs << endl;
out << "#Module.Deps " << fDeps << endl;
out << "#Module.DataTypes " << fDataTypes << endl;
+ out << "#Module.OutputFile " << fOutputFile << endl;
+ out << "#Module.TerminateFile " << fTerminateFile << endl;
out << "#Module.MacroName " << fMacroName << endl;
out << "#Module.MacroArgs " << fMacroArgs << endl;
if (fConfigDeps) {
// Data types
decode = AliAnalysisTaskCfg::DecodeValue(line);
cfg->SetDataTypes(decode);
+ } else if (cfg && line.BeginsWith("#Module.OutputFile")) {
+ // Desired output file name (via SetCommonOutput)
+ decode = AliAnalysisTaskCfg::DecodeValue(line);
+ cfg->SetOutputFileName(decode);
+ } else if (cfg && line.BeginsWith("#Module.TerminateFile")) {
+ // Custom file name produced in Terminate if any
+ decode = AliAnalysisTaskCfg::DecodeValue(line);
+ cfg->SetTerminateFileName(decode);
} else if (cfg && line.BeginsWith("#Module.MacroName")) {
// Name of the add task macro (including path)
decode = AliAnalysisTaskCfg::DecodeValue(line);