1 AliAnalysisTask *AddTaskTender(Bool_t useV0=kFALSE){
2 //get the current analysis manager
3 Bool_t checkEvtSelection = useV0;
4 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
6 Error("AddTask_tender_Tender", "No analysis manager found.");
9 // currently don't accept AOD input
10 if (!mgr->GetInputEventHandler()->InheritsFrom(AliESDInputHandler::Class())) {
11 Error("AddTask_tender_Tender","The analysis tender only works with ESD input!");
16 //========= Add tender to the ANALYSIS manager and set default storage =====
17 AliTender *tender=new AliTender("AnalysisTender");
18 tender->SetCheckEventSelection(checkEvtSelection);
19 tender->SetDefaultCDBStorage("raw://");
21 if (checkEvtSelection) {
22 if (mgr->GetTasks()->First() != (TObject*)tender) {
23 ::Error("When setting the tender to check the event selection, it has to be the first wagon ! Aborting.");
28 //========= Attach VZERO supply ======
30 AliVZEROTenderSupply *vzeroSupply=new AliVZEROTenderSupply("VZEROtender");
31 vzeroSupply->SetDebug(kFALSE);
32 tender->AddSupply(vzeroSupply);
34 //========= Attach TPC supply ======
35 AliTPCTenderSupply *tpcSupply=new AliTPCTenderSupply("TPCtender");
36 tpcSupply->SetDebugLevel(2);
37 tpcSupply->SetMip(50.);
38 tender->AddSupply(tpcSupply);
40 //========= Attach TOF supply ======
41 AliTOFTenderSupply *TOFtender = new AliTOFTenderSupply("TOFtender");
42 tender->AddSupply(TOFtender);
44 //========= Attach TRD supply ======
45 AliTRDTenderSupply *trdSupply=new AliTRDTenderSupply("TRDtender");
46 tender->AddSupply(trdSupply);
48 //========= Attach PID supply ======
49 tender->AddSupply(new AliPIDTenderSupply("PIDtender"));
51 //========= Attach Primary Vertex supply ======
52 tender->AddSupply(new AliVtxTenderSupply("PriVtxtender"));
54 //================================================
56 //================================================
58 // define output containers, please use 'username'_'somename'
59 AliAnalysisDataContainer *coutput1 =
60 mgr->CreateContainer("tender_event", AliESDEvent::Class(),
61 AliAnalysisManager::kExchangeContainer,"default_tender");
64 mgr->ConnectInput (tender, 0, mgr->GetCommonInputContainer() );
65 mgr->ConnectOutput (tender, 1, coutput1);