]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_PbPb/AliPHOSTenderTask.cxx
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_PbPb / AliPHOSTenderTask.cxx
CommitLineData
e6d12457 1// Task to hold TenderSupply in case of running on AOD.
2//
3// Author: D.Peressounko after EMCAL Tender task
4
5#include <TChain.h>
6#include <TFile.h>
7
8#include "AliAnalysisManager.h"
7d9133a4 9#include "AliPHOSTenderSupply.h"
e6d12457 10#include "AliAODEvent.h"
11
12#include "AliPHOSTenderTask.h"
13
14ClassImp(AliPHOSTenderTask)
15
16//______________________________________________________________________________
17AliPHOSTenderTask::AliPHOSTenderTask():
18 AliAnalysisTaskSE(),
19 fPHOSTender(NULL)
20{
21 // Default constructor.
22}
23
24//______________________________________________________________________________
25AliPHOSTenderTask::AliPHOSTenderTask(const char* name):
26 AliAnalysisTaskSE(name),
27 fPHOSTender(NULL)
28{
29 // Constructor.
30 DefineOutput(1, AliAODEvent::Class());
31}
32
33//______________________________________________________________________________
34AliPHOSTenderTask::~AliPHOSTenderTask()
35{
36 // Destructor
37
38 if (fPHOSTender)
39 fPHOSTender->Delete();
40}
41
42//______________________________________________________________________________
43void AliPHOSTenderTask::SetPHOSTenderSupply(AliPHOSTenderSupply *supply)
44{
45 // Set tender supply.
46
47 fPHOSTender = supply;
48 supply->SetTask(this);
49}
50
51//______________________________________________________________________________
52void AliPHOSTenderTask::ConnectInputData(Option_t *option)
53{
54 // Connect input data.
55
56 AliAnalysisTaskSE::ConnectInputData(option);
57 fPHOSTender->Init();
58}
59
60//______________________________________________________________________________
61void AliPHOSTenderTask::UserCreateOutputObjects()
62{
63 // Nothing to be done.
64}
65
66//______________________________________________________________________________
67void AliPHOSTenderTask::UserExec(Option_t*)
68{
69 // Process the event.
70
71 fPHOSTender->ProcessEvent();
72}
73//______________________________________________________________________________
74void AliPHOSTenderTask::NotifyRun(){
75 //Change of the run number
76
77 fPHOSTender->InitTender();
78}