]>
Commit | Line | Data |
---|---|---|
d42843d3 | 1 | AliAnalysisTaskSE* AddTaskZDCQA() |
2 | { | |
3 | // Creates a QA task to check ZDC data | |
4 | ||
5 | // Get the pointer to the existing analysis manager via the static access method. | |
6 | //============================================================================== | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
9 | ::Error("AddTaskZDCQA", "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 | //============================================================================== | |
15 | if (!mgr->GetInputEventHandler()) { | |
16 | ::Error("AddTaskZDCQA", "This task requires an input event handler"); | |
17 | return NULL; | |
18 | } | |
19 | TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
20 | ||
21 | // Configure analysis | |
22 | //=========================================================================== | |
e78776f6 | 23 | //AliAnalysisTaskZDC* task = new AliAnalysisTaskZDC("AliAnaZDCQA"); |
24 | AliAnalysisTaskZDCpA* task = new AliAnalysisTaskZDCpA("AliAnaZDCQA"); | |
d42843d3 | 25 | mgr->AddTask(task); |
26 | ||
27 | AliAnalysisDataContainer *cout = mgr->CreateContainer("QAZDCHists",TList::Class(), | |
28 | AliAnalysisManager::kOutputContainer, Form("%s:ZDC_Performance", | |
29 | mgr->GetCommonFileName())); | |
30 | ||
31 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
32 | mgr->ConnectOutput (task, 1, cout); | |
33 | ||
34 | return task; | |
35 | } | |
36 | ||
37 |