//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
- ::Error("AddTask", "No analysis manager to connect to.");
+ ::Error("AddTaskMTRchamberEfficiency", "No analysis manager to connect to.");
return NULL;
}
+ // Check the analysis type using the event handlers connected to the analysis manager.
+ //==============================================================================
+ if (!mgr->GetInputEventHandler()) {
+ ::Error("AliAnalysisTaskTrigChEff", "This task requires an input event handler");
+ return NULL;
+ }
+
// Create the task
AliAnalysisTaskTrigChEff* taskTrigChEff = new AliAnalysisTaskTrigChEff("TriggerChamberEfficiency");
taskTrigChEff->SetUseGhostTracks(useGhosts);
// Attach input
mgr->ConnectInput(taskTrigChEff,0,mgr->GetCommonInputContainer());
// Attach output
- mgr->ConnectOutput(taskTrigChEff,0,cOutputTrigChEff);
+ mgr->ConnectOutput(taskTrigChEff,1,cOutputTrigChEff);
return taskTrigChEff;
}