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