2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 //_________________________________________________________________________
18 // Class for reading data (ESDs) in order to do prompt gamma
19 // or other particle identification and correlations
24 //*-- Author: Gustavo Conesa (LNF-INFN)
25 //////////////////////////////////////////////////////////////////////////////
28 //---- ANALYSIS system ----
29 #include "AliCaloTrackESDReader.h"
30 #include "AliAODEvent.h"
31 #include "AliMultiEventInputHandler.h"
32 #include "AliAnalysisManager.h"
33 #include "AliMixedEvent.h"
34 #include "AliESDEvent.h"
36 ClassImp(AliCaloTrackESDReader)
38 //______________________________________________
39 AliCaloTrackESDReader::AliCaloTrackESDReader() :
44 //Initialize parameters
47 fReadAODMCParticles = kFALSE;
51 //_________________________________________________________________
52 void AliCaloTrackESDReader::SetInputOutputMCEvent(AliVEvent* esd,
56 // Connect the data pointers
58 Bool_t tesd = kFALSE ;
60 if ( strcmp(esd->GetName(), "AliMixedEvent") == 0 )
62 AliMultiEventInputHandler* multiEH = dynamic_cast<AliMultiEventInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
65 if (multiEH->GetFormat() == 0 )
72 printf("AliCaloTrackESDReader::SetInputOutputMCEvent() - MultiEventHandler is NULL");
76 if (strcmp(esd->GetName(),"AliESDEvent") == 0)
83 AliFatal(Form("AliCaloTrackESDReader::SetInputOutputMCEvent() - STOP ::Wrong reader, here only ESDs. Input name: %s != AliESDEvent \n",esd->GetName()));