]>
Commit | Line | Data |
---|---|---|
37a53dea | 1 | AliAnalysisTaskParticleEfficiency *AddTaskQAPartEff(const char* outfilename="AnalysisResults.root") |
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 | ||
ec395dd2 | 11 | //============================================================================== |
12 | if (!mgr->GetInputEventHandler()) { | |
13 | ::Error("AddTaskFemto", "This task requires an input event handler"); | |
14 | return NULL; | |
15 | } | |
16 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
17 | cout << "Found " <<type << " event handler" << endl; | |
18 | ||
19 | ||
20 | ||
37a53dea | 21 | // Create the task and configure it. |
22 | //=========================================================================== | |
23 | AliAnalysisTaskParticleEfficiency* ana = new AliAnalysisTaskParticleEfficiency("MyTask"); | |
24 | ||
25 | if (!outfilename) | |
26 | outfilename = AliAnalysisManager::GetCommonFileName(); | |
27 | ||
e75524f1 | 28 | //AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("MyList", TList::Class(),AliAnalysisManager::kOutputContainer,outfilename); |
29 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("MyList", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s", AliAnalysisManager::GetCommonFileName())); | |
37a53dea | 30 | |
31 | mgr->AddTask(ana); | |
32 | ||
33 | ||
34 | mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer()); | |
e75524f1 | 35 | mgr->ConnectOutput (ana, 1, coutput1 ); |
37a53dea | 36 | |
37 | return ana; | |
38 | ||
39 | } |