]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/macros/AddTaskEMCALTender.C
updates from Jason
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / AddTaskEMCALTender.C
CommitLineData
c4c7c022 1// $Id$
2
3AliTender *AddTaskEMCALTender(
4 const char *geoname="EMCAL_COMPLETEV1",
5 const char* datatype="pp")
fd650c0d 6{
7 // Parameters: geoname = "EMCAL_FIRSTYEARV1" or "EMCAL_COMPLETEV1" or ""
8
9 // Get the pointer to the existing analysis manager via the static access method.
10 //==============================================================================
11 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
12 if (!mgr) {
13 ::Error("AddTaskTrgContam", "No analysis manager to connect to.");
14 return NULL;
15 }
16
17 // Create the task and configure it.
18 //===========================================================================
27fde6c7 19 AliTender* ana = new AliTender("AliTender");
fd650c0d 20
21 ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7);
22
23
24 Bool_t ismc = (mgr->GetMCtruthEventHandler() != NULL);
25
26
27 mgr->AddTask(ana);
fd650c0d 28
a55e4f1d 29 gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigEmcalTenderSupply.C");
30 AliEMCALTenderSupply *EMCALSupply = ConfigEmcalTenderSupply(geoname, kTRUE);
31
fd650c0d 32 ana->AddSupply(EMCALSupply);
a55e4f1d 33
fd650c0d 34 // Create ONLY the output containers for the data produced by the task.
35 // Get and connect other common input/output containers via the manager as below
36 //==============================================================================
85ed2f4c 37 AliAnalysisDataContainer *coutput1 =
38 mgr->CreateContainer("tender_event",
39 AliESDEvent::Class(),
40 AliAnalysisManager::kExchangeContainer,
41 "default_tender");
fd650c0d 42 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
43 mgr->ConnectOutput (ana, 1, coutput1 );
44
45 return ana;
46}