hooks for PMD flow analysis
[u/mrichter/AliRoot.git] / PWG2 / FLOW / macros / AddTaskTenderFlow.C
CommitLineData
16b7877b 1AliAnalysisTask* AddTaskTenderFlow( Float_t tofres = 80,
2 Bool_t corrExpTimes=kFALSE,
3 Bool_t applyT0=kFALSE)
4{
5 //get the current analysis manager
6 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
7 if (!mgr) {
8 Error("AddTask_tender_Tender", "No analysis manager found.");
9 return 0;
10 }
11 // currently don't accept AOD input
12 if (!mgr->GetInputEventHandler()->InheritsFrom(AliESDInputHandler::Class())) {
13 Error("AddTask_tender_Tender","The analysis tender only works with ESD input!");
14 return 0;
15 }
16
17 //========= Add tender to the ANALYSIS manager and set default storage =====
18 AliTender *tender=new AliTender("AnalysisTender");
19 tender->SetCheckEventSelection(kFALSE);
20 //tender->SetDefaultCDBStorage("raw://");
21 tender->SetDefaultCDBStorage("alien://folder=/alice/data/2010/OCDB");
22 mgr->AddTask(tender);
23
24 //========= Attach TOF supply ======
25 AliTOFTenderSupply *TOFtender = new AliTOFTenderSupply("TOFtender");
26 TOFtender->SetTOFres(tofres);
27 TOFtender->SetApplyT0(applyT0);
28 TOFtender->SetCorrectExpTimes(corrExpTimes);
29 //TOFtender->SetTheorExpTimes(kTRUE);
30 tender->AddSupply(TOFtender);
31
32 //========= Attach TPC supply ======
33 AliTPCTenderSupply *tpcSupply=new AliTPCTenderSupply("TPCtender");
34 tpcSupply->SetDebugLevel(2);
35 //tpcSupply->SetMip(50.);
36 tender->AddSupply(tpcSupply);
37
38 //define output containers, please use 'username'_'somename'
39 AliAnalysisDataContainer *coutput1 =
40 mgr->CreateContainer("tender_event", AliESDEvent::Class(),
41 AliAnalysisManager::kExchangeContainer,"default_tender");
42
43 //connect containers
44 mgr->ConnectInput (tender, 0, mgr->GetCommonInputContainer() );
45 mgr->ConnectOutput (tender, 1, coutput1);
46
47 return tender;
48}