2011 track cuts
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliEmcalTenderTask.cxx
1 // $Id$
2 //
3 // Task to hold TenderSupply in case of running on AOD.
4 // 
5 // Author: S.Aiola, C.Loizides
6
7 #include <TChain.h>
8 #include <TFile.h>
9
10 #include "AliAnalysisManager.h"
11 #include "TenderSupplies/AliEMCALTenderSupply.h"
12 #include "AliAODEvent.h"
13
14 #include "AliEmcalTenderTask.h"
15
16 ClassImp(AliEmcalTenderTask)
17
18 //______________________________________________________________________________
19 AliEmcalTenderTask::AliEmcalTenderTask():
20   AliAnalysisTaskSE(),
21   fEMCALTender(NULL)
22 {
23   // Default constructor.
24 }
25
26 //______________________________________________________________________________
27 AliEmcalTenderTask::AliEmcalTenderTask(const char* name):
28   AliAnalysisTaskSE(name),
29   fEMCALTender(NULL)
30 {
31   // Constructor.
32   DefineOutput(1,  AliAODEvent::Class());
33 }
34
35 //______________________________________________________________________________
36 AliEmcalTenderTask::~AliEmcalTenderTask()
37 {
38   // Destructor
39
40   if (fEMCALTender)
41     fEMCALTender->Delete();
42 }
43
44 //______________________________________________________________________________
45 void AliEmcalTenderTask::SetEMCALTenderSupply(AliEMCALTenderSupply *supply)
46 {
47   // Set tender supply.
48
49   fEMCALTender = supply;
50   supply->SetTask(this);
51 }
52    
53 //______________________________________________________________________________
54 void AliEmcalTenderTask::ConnectInputData(Option_t *option)
55 {
56   // Connect input data.
57
58   AliAnalysisTaskSE::ConnectInputData(option);
59   fEMCALTender->Init();
60 }
61
62 //______________________________________________________________________________
63 void AliEmcalTenderTask::UserCreateOutputObjects()
64 {
65   // Nothing to be done.
66 }
67
68 //______________________________________________________________________________
69 void AliEmcalTenderTask::UserExec(Option_t*)
70 {
71   // Process the event.
72
73   fEMCALTender->ProcessEvent();
74 }