AliPhysics  a3b326c (a3b326c)
AliEmcalTenderTask.cxx
Go to the documentation of this file.
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 "AliEMCALTenderSupply.h"
12 #include "AliAODEvent.h"
13 
14 #include "AliEmcalTenderTask.h"
15 
16 ClassImp(AliEmcalTenderTask)
17 
18 //______________________________________________________________________________
21  fEMCALTender(NULL)
22 {
23  // Default constructor.
24 }
25 
26 //______________________________________________________________________________
28  AliAnalysisTaskSE(name),
29  fEMCALTender(NULL)
30 {
31  // Constructor.
32  DefineOutput(1, AliAODEvent::Class());
33 }
34 
35 //______________________________________________________________________________
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 //______________________________________________________________________________
63 {
64  // Connect input data.
65 
66  AliAnalysisTaskSE::ConnectInputData(option);
67  fEMCALTender->Init();
68 }
69 
70 //______________________________________________________________________________
72 {
73  // Nothing to be done.
74 }
75 
76 //______________________________________________________________________________
78 {
79  // Process the event.
80 
81  fEMCALTender->ProcessEvent();
82 }
AliEMCALTenderSupply * fEMCALTender
virtual void UserCreateOutputObjects()
virtual void ConnectInputData(Option_t *option)
virtual void UserExec(Option_t *)
AliEMCALTenderSupply * GetEMCALTenderSupply() const
const char Option_t
Definition: External.C:48
void SetEMCALTenderSupply(AliEMCALTenderSupply *supply)