]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG4/macros/AddTaskDiJets.C
Added an output container to the DiJet task
[u/mrichter/AliRoot.git] / PWG4 / macros / AddTaskDiJets.C
index 4af9dcab2af0c63241e1cbced824ff7dafdcf5a2..d911d637d63a7596fe91146fa08e441e9349037b 100644 (file)
@@ -1,6 +1,6 @@
 AliAnalysisTaskDiJets *AddTaskDiJets()\r
 {\r
-// Creates a jet fider task, configures it and adds it to the analysis manager.\r
+// Creates a dijet 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
@@ -8,8 +8,8 @@ AliAnalysisTaskDiJets *AddTaskDiJets()
    if (!mgr) {\r
       ::Error("AddTaskJets", "No analysis manager to connect to.");\r
       return NULL;\r
-   }  \r
-   \r
+   }\r
+\r
    // Check the analysis type using the event handlers connected to the analysis manager.\r
    //==============================================================================\r
    if (!mgr->GetInputEventHandler()) {\r
@@ -19,16 +19,20 @@ AliAnalysisTaskDiJets *AddTaskDiJets()
 \r
    // Create the task and configure it.\r
    //===========================================================================\r
-   \r
+\r
    AliAnalysisTaskDiJets *dijetana = new AliAnalysisTaskDiJets("DiJetAnalysis");\r
-   \r
+   dijetana->SetDebugLevel(10);\r
    mgr->AddTask(dijetana);\r
-      \r
+\r
+   AliAnalysisDataContainer *cout_dijet = mgr->CreateContainer("DiJet", TList::Class(),AliAnalysisManager::kOutputContainer,\r
+     Form("%s:PWG4_DiJet",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  (dijetana, 0, mgr->GetCommonInputContainer());\r
    mgr->ConnectOutput (dijetana, 0, mgr->GetCommonOutputContainer());\r
-   \r
+   mgr->ConnectOutput (dijetana, 1, cout_dijet);\r
+\r
    return dijetana;\r
 }\r