]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG1/HMPID/AddTaskHmpidQA.C
new version of HMPID QA task (D.Perrino)
[u/mrichter/AliRoot.git] / PWG1 / HMPID / AddTaskHmpidQA.C
index b43c6b0d96fad526813b7b348f3420535a9c4cbe..5ac0b62c241f538e9e59711c7a9465f9d7781b5c 100644 (file)
@@ -1,43 +1,39 @@
-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("HmpidTree", 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, 0, mgr->GetCommonOutputContainer());
-   mgr->ConnectOutput (hmpTask, 1, cout_hmpid);
-   mgr->ConnectOutput (hmpTask, 2, cout_tree);
-
-   return hmpTask;
-}
\ No newline at end of file
+AliHMPIDTaskQA *AddTaskHmpidQA(Bool_t useMC=kTRUE)\r
+{\r
+// Creates a HMPID task, configures it and adds it to the analysis manager.\r
+\r
+   // Get the pointer to the existing analysis manager via the static access method.\r
+   //==============================================================================\r
+   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
+   if (!mgr) {\r
+      ::Error("AddTaskHmpidQA", "No analysis manager to connect to.");\r
+      return NULL;\r
+   }\r
+\r
+   // Check the analysis type using the event handlers connected to the analysis manager.\r
+   //==============================================================================\r
+   if (!mgr->GetInputEventHandler()) {\r
+      ::Error("AddTaskHmpidQA", "This task requires an input event handler");\r
+      return NULL;\r
+   }\r
+\r
+   // Create the task and configure it.\r
+   //===========================================================================\r
+\r
+   AliHMPIDTaskQA *hmpTask = new AliHMPIDTaskQA("HMPIDTaskQA");\r
+   hmpTask->SetDebugLevel(0);\r
+   hmpTask->SelectCollisionCandidates();\r
+   hmpTask->SetUseMC(useMC);\r
+   mgr->AddTask(hmpTask);\r
+\r
+   AliAnalysisDataContainer *cout_hmpid= mgr->CreateContainer("HmpidQA", TList::Class(),AliAnalysisManager::kOutputContainer,\r
+                                           Form("%s:HmpidQA",AliAnalysisManager::GetCommonFileName()));\r
+\r
+   // Create ONLY the output containers for the data produced by the task.\r
+   // Get and connect other common input/output containers via the manager as below\r
+   //==============================================================================\r
+   mgr->ConnectInput  (hmpTask, 0, mgr->GetCommonInputContainer());\r
+   mgr->ConnectOutput (hmpTask, 1, cout_hmpid);\r
+\r
+   return hmpTask;\r
+}\r