1 AliAnalysisTask *AddTaskTender(){
2 //get the current analysis manager
3 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
5 Error("AddTask_tender_Tender", "No analysis manager found.");
8 // currently don't accept AOD input
9 if (mgr->GetInputEventHandler()->IsA()!=AliESDInputHandler::Class()) {
10 Error("AddTask_tender_Tender","The analysis tender only works with ESD input!");
15 //========= Add tender to the ANALYSIS manager and set default storage =====
16 AliTender *tender=new AliTender("AnalysisTender");
17 tender->SetDefaultCDBStorage("raw://");
20 //========= Attach TPC supply ======
21 AliTPCTenderSupply *tpcSupply=new AliTPCTenderSupply("TPCtender");
22 tender->AddSupply(tpcSupply);
24 //========= Attach TOF supply ======
25 AliTOFTenderSupply *TOFtender = new AliTOFTenderSupply("TOFtender");
26 tender->AddSupply(TOFtender);
28 //========= Attach TRD supply ======
29 AliTRDTenderSupply *trdSupply=new AliTRDTenderSupply("TRDtender");
30 tender->AddSupply(trdSupply);
32 //========= Attach PID supply ======
33 tender->AddSupply(new AliPIDTenderSupply("PIDtender"));
35 //========= Attach Primary Vertex supply ======
36 tender->AddSupply(new AliVtxTenderSupply("PriVtxtender"));
38 //================================================
40 //================================================
42 // define output containers, please use 'username'_'somename'
43 AliAnalysisDataContainer *coutput1 =
44 mgr->CreateContainer("tender_event", AliESDEvent::Class(),
45 AliAnalysisManager::kExchangeContainer,"default_tender");
48 mgr->ConnectInput (tender, 0, mgr->GetCommonInputContainer() );
49 mgr->ConnectOutput (tender, 0, coutput1);