ROOT logo
AliHMPIDTaskQA *AddTaskHmpidQA(Bool_t useMC=kTRUE)
{
// Creates a HMPID task, configures it and adds it to the analysis manager.

   // Get the pointer to the existing analysis manager via the static access method.
   //==============================================================================
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr) {
      ::Error("AddTaskHmpidQA", "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("AddTaskHmpidQA", "This task requires an input event handler");
      return NULL;
   }

   // Create the task and configure it.
   //===========================================================================

   AliHMPIDTaskQA *hmpTask = new AliHMPIDTaskQA("HMPIDTaskQA");
   hmpTask->SetDebugLevel(0);
   hmpTask->SelectCollisionCandidates();
   hmpTask->SetUseMC(useMC);
   mgr->AddTask(hmpTask);

   AliAnalysisDataContainer *cout_hmpid= mgr->CreateContainer("HmpidQA", TList::Class(),AliAnalysisManager::kOutputContainer,
                                           Form("%s:HmpidQA",AliAnalysisManager::GetCommonFileName()));
   AliAnalysisDataContainer *cout_tree = mgr->CreateContainer("HmpidQAtree", TTree::Class(),AliAnalysisManager::kOutputContainer,
                                           Form("%s:HmpidQA",AliAnalysisManager::GetCommonFileName()));

   // Create ONLY the output containers for the data produced by the task.
   // Get and connect other common input/output containers via the manager as below
   //==============================================================================
   mgr->ConnectInput  (hmpTask, 0, mgr->GetCommonInputContainer());
   mgr->ConnectOutput (hmpTask, 1, cout_hmpid);
   mgr->ConnectOutput (hmpTask, 2, cout_tree);

   return hmpTask;
}
 AddTaskHmpidQA.C:1
 AddTaskHmpidQA.C:2
 AddTaskHmpidQA.C:3
 AddTaskHmpidQA.C:4
 AddTaskHmpidQA.C:5
 AddTaskHmpidQA.C:6
 AddTaskHmpidQA.C:7
 AddTaskHmpidQA.C:8
 AddTaskHmpidQA.C:9
 AddTaskHmpidQA.C:10
 AddTaskHmpidQA.C:11
 AddTaskHmpidQA.C:12
 AddTaskHmpidQA.C:13
 AddTaskHmpidQA.C:14
 AddTaskHmpidQA.C:15
 AddTaskHmpidQA.C:16
 AddTaskHmpidQA.C:17
 AddTaskHmpidQA.C:18
 AddTaskHmpidQA.C:19
 AddTaskHmpidQA.C:20
 AddTaskHmpidQA.C:21
 AddTaskHmpidQA.C:22
 AddTaskHmpidQA.C:23
 AddTaskHmpidQA.C:24
 AddTaskHmpidQA.C:25
 AddTaskHmpidQA.C:26
 AddTaskHmpidQA.C:27
 AddTaskHmpidQA.C:28
 AddTaskHmpidQA.C:29
 AddTaskHmpidQA.C:30
 AddTaskHmpidQA.C:31
 AddTaskHmpidQA.C:32
 AddTaskHmpidQA.C:33
 AddTaskHmpidQA.C:34
 AddTaskHmpidQA.C:35
 AddTaskHmpidQA.C:36
 AddTaskHmpidQA.C:37
 AddTaskHmpidQA.C:38
 AddTaskHmpidQA.C:39
 AddTaskHmpidQA.C:40
 AddTaskHmpidQA.C:41
 AddTaskHmpidQA.C:42
 AddTaskHmpidQA.C:43