}
// Define input and output slots here
DefineOutput(1, TList::Class());
+ fBranchNames = "ESD:AliESDRun.,AliESDHeader.,AliMultiplicity.,AliESDFMD.,AliESDVZERO.,AliESDZDC.,SPDVertex.,PrimaryVertex.";
AliLog::SetClassDebugLevel("AliPhysicsSelectionTask", AliLog::kWarning);
}
// histograms are in the output list and deleted when the output
// list is deleted by the TSelector dtor
- if (fOutput) {
+ if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {
delete fOutput;
fOutput = 0;
}
fPhysicsSelection = new AliPhysicsSelection;
fOutput->Add(fPhysicsSelection);
+ // All tasks must post data once for all outputs (AG)
+ PostData(1, fOutput);
}
void AliPhysicsSelectionTask::UserExec(Option_t*)
PostData(1, fOutput);
}
+void AliPhysicsSelectionTask::FinishTaskOutput()
+{
+// This gets called at the end of the processing on the worker. It allows dumping
+// statistics printed by the physics selection object to the statistics message
+// handled by the analysis manager.
+ if (fPhysicsSelection) fPhysicsSelection->Print("STAT");
+}
+
void AliPhysicsSelectionTask::Terminate(Option_t *)
{
// The Terminate() function is the last function to be called during
if (fPhysicsSelection)
{
fPhysicsSelection->Print();
- fPhysicsSelection->SaveHistograms("physics_selection");
+ fPhysicsSelection->SaveHistograms();
}
fout->Write();