]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/macros/AddTaskMTRchamberEfficiency.C
removing osolete macros
[u/mrichter/AliRoot.git] / PWG1 / macros / AddTaskMTRchamberEfficiency.C
CommitLineData
29f50363 1AliAnalysisTaskTrigChEff *AddTaskMTRchamberEfficiency(Bool_t useGhosts = kFALSE)
2{
3 //
4 // Task for the determination of the MUON trigger chamber efficiency
5 //
6 // stocco@subatech.in2p3.fr
7 //
8
9
10 // Get the pointer to the existing analysis manager via the static access method.
11 //==============================================================================
12 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
13 if (!mgr) {
1925ef8f 14 ::Error("AddTaskMTRchamberEfficiency", "No analysis manager to connect to.");
29f50363 15 return NULL;
16 }
17
1925ef8f 18 // Check the analysis type using the event handlers connected to the analysis manager.
19 //==============================================================================
20 if (!mgr->GetInputEventHandler()) {
21 ::Error("AliAnalysisTaskTrigChEff", "This task requires an input event handler");
22 return NULL;
23 }
24
29f50363 25 // Create the task
26 AliAnalysisTaskTrigChEff* taskTrigChEff = new AliAnalysisTaskTrigChEff("TriggerChamberEfficiency");
27 taskTrigChEff->SetUseGhostTracks(useGhosts);
28 // Add to the manager
29 mgr->AddTask(taskTrigChEff);
30
31 //
32 // Create containers for input/output
997f86cb 33 AliAnalysisDataContainer *cOutputTrigChEff = mgr->CreateContainer("triggerChamberEff", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:MUON.TriggerEfficiencyMap", mgr->GetCommonFileName()));
29f50363 34
35 // Attach input
36 mgr->ConnectInput(taskTrigChEff,0,mgr->GetCommonInputContainer());
37 // Attach output
1925ef8f 38 mgr->ConnectOutput(taskTrigChEff,1,cOutputTrigChEff);
29f50363 39
40 return taskTrigChEff;
41}