]>
Commit | Line | Data |
---|---|---|
9f831b2d | 1 | AliAnalysisTaskOmegaPi0PiPi* AddTaskomega3pi() |
2 | { | |
3 | // Creates an omega(782) --> pi0 pi+ pi- analysis task, | |
4 | // configures it and adds it to the analysis manager. | |
5 | ||
6 | // Get the pointer to the existing analysis manager via the static access method. | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
9 | ::Error("AddTaskomega3pi", "No analysis manager to connect to."); | |
10 | return NULL; | |
11 | } | |
12 | ||
13 | // Check the analysis type using the event handlers connected to the analysis manager. | |
14 | if (!mgr->GetInputEventHandler()) { | |
15 | ::Error("AddTaskomega3pi", "This task requires an input event handler"); | |
16 | return NULL; | |
17 | } | |
18 | ||
19 | // Add task | |
20 | AliAnalysisTaskOmegaPi0PiPi *omegaTask = new AliAnalysisTaskOmegaPi0PiPi("OmegaPi0PiPi"); | |
21 | mgr->AddTask(omegaTask); | |
22 | ||
23 | // Create containers for input/output | |
24 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
6e7a9a8c | 25 | //AliAnalysisDataContainer *coutput = mgr->CreateContainer("histos",TList::Class(),AliAnalysisManager::kOutputContainer,"histos.root"); |
26 | ||
27 | ||
28 | TString outputfile = AliAnalysisManager::GetCommonFileName(); | |
3583d89b | 29 | AliAnalysisDataContainer *coutput = mgr->CreateContainer("omega3pi", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PWG4_omega3pi",outputfile.Data())); |
9f831b2d | 30 | |
31 | // Connect input/output | |
32 | mgr->ConnectInput(omegaTask, 0, cinput); | |
33 | mgr->ConnectOutput(omegaTask, 1, coutput); | |
34 | ||
35 | return omegaTask; | |
36 | } | |
37 | ||
38 |