]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/macros/dphicorrelations/AddTaskPhiCorrelationsQA.C
end-of-line normalization
[u/mrichter/AliRoot.git] / PWGCF / Correlations / macros / dphicorrelations / AddTaskPhiCorrelationsQA.C
CommitLineData
a65a7e70 1AliPhiCorrelationsQATask *AddTaskPhiCorrelationsQA()
2{
3 // Get the pointer to the existing analysis manager via the static access method.
4 //==============================================================================
5 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
6 if (!mgr) {
7 ::Error("AddTaskPhiCorrelations", "No analysis manager to connect to.");
8 return NULL;
9 }
10
11 // Create the task and configure it.
12 //===========================================================================
13 AliPhiCorrelationsQATask* ana = new AliPhiCorrelationsQATask("");
14
15 ana->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kUserDefined);
16
17 Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL);
18 if (isMC)
19 ana->SetUseUncheckedCentrality();
20
21 mgr->AddTask(ana);
22
23 // Create ONLY the output containers for the data produced by the task.
24 // Get and connect other common input/output containers via the manager as below
25 //==============================================================================
26 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosPhiCorrelationsQA", TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s", AliAnalysisManager::GetCommonFileName()));
27
28 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
29 mgr->ConnectOutput (ana, 1, coutput1 );
30
31 return ana;
32}