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