]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/CaloTrackCorrBase/AliCaloTrackESDReader.cxx
Transition PWG4 --> PWGGA
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliCaloTrackESDReader.cxx
CommitLineData
1c5acb87 1
2/**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
7 * *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
16/* $Id: $ */
17
18//_________________________________________________________________________
19// Class for reading data (ESDs) in order to do prompt gamma
20// or other particle identification and correlations
21//
0ae57829 22//
591cc579 23//
24//
1c5acb87 25//*-- Author: Gustavo Conesa (LNF-INFN)
26//////////////////////////////////////////////////////////////////////////////
27
28
1c5acb87 29//---- ANALYSIS system ----
30#include "AliCaloTrackESDReader.h"
1c5acb87 31#include "AliAODEvent.h"
c8fe2783 32#include "AliMultiEventInputHandler.h"
33#include "AliAnalysisManager.h"
c8fe2783 34#include "AliMixedEvent.h"
f3138ecf 35#include "AliESDEvent.h"
1c5acb87 36
37ClassImp(AliCaloTrackESDReader)
38
43074325 39//______________________________________________
1c5acb87 40AliCaloTrackESDReader::AliCaloTrackESDReader() :
41AliCaloTrackReader()
42{
78219bac 43 //Default Ctor
44
45 //Initialize parameters
46 fDataType=kESD;
47 fReadStack = kTRUE;
48 fReadAODMCParticles = kFALSE;
1c5acb87 49
0ae57829 50}
1c5acb87 51
43074325 52//_________________________________________________________________
53void AliCaloTrackESDReader::SetInputOutputMCEvent(AliVEvent* esd,
54 AliAODEvent* aod,
55 AliMCEvent* mc)
56{
477d6cee 57 // Connect the data pointers
58
c8fe2783 59 Bool_t tesd = kFALSE ;
43074325 60
c8fe2783 61 if ( strcmp(esd->GetName(), "AliMixedEvent") == 0 ) {
62 AliMultiEventInputHandler* multiEH = dynamic_cast<AliMultiEventInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
898c9d44 63 if(multiEH){
64 if (multiEH->GetFormat() == 0 ) {
65 tesd = kTRUE ;
66 }
67 }
68 else{
69 printf("AliCaloTrackESDReader::SetInputOutputMCEvent() - MultiEventHandler is NULL");
70 abort();
c8fe2783 71 }
72 }
73 if (strcmp(esd->GetName(),"AliESDEvent") == 0) {
74 tesd = kTRUE ;
75 }
76
77 if(!tesd){
78 AliFatal(Form("AliCaloTrackESDReader::SetInputOutputMCEvent() - STOP ::Wrong reader, here only ESDs. Input name: %s != AliESDEvent \n",esd->GetName()));
477d6cee 79 }
80
81 SetInputEvent(esd);
82 SetOutputEvent(aod);
83 SetMC(mc);
84
1c5acb87 85}
43074325 86
87
88