]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/EMCAL/AliEmcalTenderTask.cxx
add TPC-only track cuts support
[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 AliEMCALTenderSupply* AliEmcalTenderTask::GetEMCALTenderSupply() const
55 {
56   // Get tender supply.
57
58   return fEMCALTender;
59 }
60    
61 //______________________________________________________________________________
62 void AliEmcalTenderTask::ConnectInputData(Option_t *option)
63 {
64   // Connect input data.
65
66   AliAnalysisTaskSE::ConnectInputData(option);
67   fEMCALTender->Init();
68 }
69
70 //______________________________________________________________________________
71 void AliEmcalTenderTask::UserCreateOutputObjects()
72 {
73   // Nothing to be done.
74 }
75
76 //______________________________________________________________________________
77 void AliEmcalTenderTask::UserExec(Option_t*)
78 {
79   // Process the event.
80
81   fEMCALTender->ProcessEvent();
82 }