]>
Commit | Line | Data |
---|---|---|
1 | AliAnalysisTaskDiJets *AddTaskDiJets()\r | |
2 | {\r | |
3 | // Creates a dijet task, configures it and adds it to the analysis manager.\r | |
4 | \r | |
5 | // Get the pointer to the existing analysis manager via the static access method.\r | |
6 | //==============================================================================\r | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r | |
8 | if (!mgr) {\r | |
9 | ::Error("AddTaskJets", "No analysis manager to connect to.");\r | |
10 | return NULL;\r | |
11 | }\r | |
12 | \r | |
13 | // Check the analysis type using the event handlers connected to the analysis manager.\r | |
14 | //==============================================================================\r | |
15 | if (!mgr->GetInputEventHandler()) {\r | |
16 | ::Error("AddTaskDiJets", "This task requires an input event handler");\r | |
17 | return NULL;\r | |
18 | }\r | |
19 | \r | |
20 | // Create the task and configure it.\r | |
21 | //===========================================================================\r | |
22 | \r | |
23 | AliAnalysisTaskDiJets *dijetana = new AliAnalysisTaskDiJets("DiJetAnalysis");\r | |
24 | dijetana->SetDebugLevel(10);\r | |
25 | mgr->AddTask(dijetana);\r | |
26 | \r | |
27 | AliAnalysisDataContainer *cout_dijet = mgr->CreateContainer("DiJet", TList::Class(),AliAnalysisManager::kOutputContainer,\r | |
28 | Form("%s:PWG4_DiJet",AliAnalysisManager::GetCommonFileName()));\r | |
29 | \r | |
30 | // Create ONLY the output containers for the data produced by the task.\r | |
31 | // Get and connect other common input/output containers via the manager as below\r | |
32 | //==============================================================================\r | |
33 | mgr->ConnectInput (dijetana, 0, mgr->GetCommonInputContainer());\r | |
34 | mgr->ConnectOutput (dijetana, 0, mgr->GetCommonOutputContainer());\r | |
35 | mgr->ConnectOutput (dijetana, 1, cout_dijet);\r | |
36 | \r | |
37 | return dijetana;\r | |
38 | }\r |