]>
Commit | Line | Data |
---|---|---|
a8ad4709 | 1 | AliAnalysisTask *AddTaskLambdaBayes(Bool_t ismc=kFALSE,Bool_t qa=kTRUE,Int_t filterbit=4){ |
2 | ||
3 | //get the current analysis manager | |
4 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
5 | if (!mgr) { | |
6 | Error("No manager found in AddTaskVZERO. Why?"); | |
7 | return 0; | |
8 | } | |
9 | // currently don't accept AOD input | |
10 | if (!mgr->GetInputEventHandler()->InheritsFrom(AliAODInputHandler::Class())) { | |
11 | Error("AddTaskLambdaBayes","This task works only with AOD input!"); | |
12 | return 0; | |
13 | } | |
14 | ||
15 | //========= Add tender to the ANALYSIS manager and set default storage ===== | |
16 | char mytaskName[100]; | |
17 | snprintf(mytaskName,100,"AliAnalysisTaskLambdaBayes.cxx"); | |
18 | ||
19 | AliAnalysisTaskLambdaBayes *task = new AliAnalysisTaskLambdaBayes(mytaskName); | |
20 | if(ismc) task->SetMC(); | |
21 | if(qa) task->SetQA(); | |
22 | task->SetEtaCut(0.8); | |
23 | task->SetFilterBit(filterbit); | |
24 | ||
25 | mgr->AddTask(task); | |
26 | ||
27 | //Attach input to my tasks | |
28 | AliAnalysisDataContainer *cinput = mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer); | |
29 | mgr->ConnectInput(task,0,mgr->GetCommonInputContainer()); | |
30 | ||
31 | // Attach output to my tasks | |
32 | AliAnalysisDataContainer *cOutputL= mgr->CreateContainer("contLambdaBayes1",TList::Class(), AliAnalysisManager::kOutputContainer, | |
33 | AliAnalysisManager::GetCommonFileName()); | |
34 | mgr->ConnectOutput(task, 1, cOutputL); | |
35 | ||
36 | AliAnalysisDataContainer *cOutputL2= mgr->CreateContainer("contLambdaBayes2",TList::Class(), AliAnalysisManager::kOutputContainer, | |
37 | AliAnalysisManager::GetCommonFileName()); | |
38 | mgr->ConnectOutput(task, 2, cOutputL2); | |
39 | ||
40 | AliAnalysisDataContainer *cOutputL3= mgr->CreateContainer("contLambdaBayes3",TList::Class(), AliAnalysisManager::kOutputContainer, | |
41 | AliAnalysisManager::GetCommonFileName()); | |
42 | mgr->ConnectOutput(task, 3, cOutputL3); | |
43 | ||
44 | return task; | |
45 | } | |
46 |