]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/T0/AddTaskT0QA.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGPP / T0 / AddTaskT0QA.C
CommitLineData
07682040 1AliAnalysisTaskSE* AddTaskT0QA()
2{
3 // Creates a QA task to check T0 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("AddTaskT0QA", "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("AddTaskT0QA", "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 //===========================================================================
23
24
25
26 AliT0AnalysisTaskQA* task = new AliT0AnalysisTaskQA("AliAnaT0QA");
27 mgr->AddTask(task);
28
29 AliAnalysisDataContainer *coutput = mgr->CreateContainer("QAT0chists", TObjArray::Class(),
30 AliAnalysisManager::kOutputContainer, Form("%s:T0_Performance",
31 mgr->GetCommonFileName()));
32
33
34 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
35 mgr->ConnectOutput (task, 1, coutput);
36
37 return task;
38}
39
40