| 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(); |
| 25 | //AliAnalysisDataContainer *coutput = mgr->CreateContainer("histos",TList::Class(),AliAnalysisManager::kOutputContainer,"histos.root"); |
| 26 | |
| 27 | |
| 28 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
| 29 | AliAnalysisDataContainer *coutput = mgr->CreateContainer("omega3pi", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PWGGA_omega3pi",outputfile.Data())); |
| 30 | |
| 31 | // Connect input/output |
| 32 | mgr->ConnectInput(omegaTask, 0, cinput); |
| 33 | mgr->ConnectOutput(omegaTask, 1, coutput); |
| 34 | |
| 35 | return omegaTask; |
| 36 | } |
| 37 | |
| 38 | |