3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* Sedat Altinpinar <Sedat.Altinpinar@cern.ch> *
9 //* Hege Erdal <hege.erdal@gmail.com> *
11 //* Permission to use, copy, modify and distribute this software and its *
12 //* documentation strictly for non-commercial purposes is hereby granted *
13 //* without fee, provided that the above copyright notice appears in all *
14 //* copies and that both the copyright notice and this permission notice *
15 //* appear in the supporting documentation. The authors make no claims *
16 //* about the suitability of this software for any purpose. It is *
17 //* provided "as is" without express or implied warranty. *
18 //**************************************************************************
20 /// @file AliAnalysisTaskDxHFEParticleSelection.cxx
21 /// @author Sedat Altinpinar, Hege Erdal, Matthias Richter
23 /// @brief AnalysisTask electron selection for D0 - HFE correlation
26 #include "AliAnalysisTaskDxHFEParticleSelection.h"
27 #include "AliDxHFEParticleSelection.h"
28 #include "AliAnalysisManager.h"
30 #include "AliESDInputHandler.h"
35 /// ROOT macro for the implementation of ROOT specific class methods
36 ClassImp(AliAnalysisTaskDxHFEParticleSelection)
38 AliAnalysisTaskDxHFEParticleSelection::AliAnalysisTaskDxHFEParticleSelection(const char* opt)
39 : AliAnalysisTaskSE("AliAnalysisTaskDxHFEParticleSelection")
51 int AliAnalysisTaskDxHFEParticleSelection::DefineSlots()
53 // define the data slots
54 DefineInput(0, TChain::Class());
55 DefineOutput(1, TList::Class());
59 AliAnalysisTaskDxHFEParticleSelection::~AliAnalysisTaskDxHFEParticleSelection()
65 // histograms are in the output list and deleted when the output
66 // list is deleted by the TSelector dtor
68 if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) {
80 void AliAnalysisTaskDxHFEParticleSelection::UserCreateOutputObjects()
82 // create result objects and add to output list
87 // all tasks must post data once for all outputs
91 void AliAnalysisTaskDxHFEParticleSelection::UserExec(Option_t* /*option*/)
95 // TODO: implement correct input, this is likely not to be the
97 TObject* pInput=InputEvent();
99 AliError("failed to get input");
102 AliVEvent *pEvent = dynamic_cast<AliVEvent*>(pInput);
104 AliError(Form("input of wrong class type %s, expecting AliVEvent", pInput->ClassName()));
108 PostData(1, fOutput);
111 void AliAnalysisTaskDxHFEParticleSelection::FinishTaskOutput()
113 // end of the processing
116 void AliAnalysisTaskDxHFEParticleSelection::Terminate(Option_t *)
118 // last action on the client
119 fOutput = dynamic_cast<TList*> (GetOutputData(1));
121 AliFatal("failed to get output container");