]>
Commit | Line | Data |
---|---|---|
78167ba7 | 1 | |
2 | ||
3 | AliPhysicsSelectionTask* AddTaskPhysicsSelection() { | |
4 | ||
5 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
6 | if (!mgr) { | |
81dece39 | 7 | ::Error("AddTaskPhysicsSelection", "No analysis manager to connect to."); |
78167ba7 | 8 | return NULL; |
9 | } | |
10 | ||
11 | // Check the analysis type using the event handlers connected to the analysis manager. | |
12 | //============================================================================== | |
13 | if (!mgr->GetInputEventHandler()) { | |
81dece39 | 14 | ::Error("AddTaskPhysicsSelection", "This task requires an input event handler"); |
78167ba7 | 15 | return NULL; |
16 | } | |
17 | TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
18 | ||
19 | // Configure analysis | |
20 | //=========================================================================== | |
21 | ||
22 | ||
23 | ||
24 | AliPhysicsSelectionTask *task= new AliPhysicsSelectionTask(""); | |
25 | mgr->AddTask(task); | |
26 | ||
27 | ||
28 | ||
29 | AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer(); | |
30 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("cstatsout", | |
31 | TList::Class(), | |
32 | AliAnalysisManager::kOutputContainer, | |
eb102628 | 33 | "EventStat_temp.root"); |
78167ba7 | 34 | |
35 | ||
36 | ||
37 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
38 | mgr->ConnectOutput(task,1,coutput1); | |
39 | ||
40 | return task; | |
41 | ||
42 | } | |
43 | //_____________________________________________________________________________ |