]>
Commit | Line | Data |
---|---|---|
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 | ||
29 | // --- ROOT system --- | |
30 | //#include "Riostream.h" | |
31 | ||
32 | //---- ANALYSIS system ---- | |
33 | #include "AliCaloTrackESDReader.h" | |
1c5acb87 | 34 | #include "AliAODEvent.h" |
c8fe2783 | 35 | #include "AliMultiEventInputHandler.h" |
36 | #include "AliAnalysisManager.h" | |
c8fe2783 | 37 | #include "AliMixedEvent.h" |
38 | ||
1c5acb87 | 39 | |
40 | ClassImp(AliCaloTrackESDReader) | |
41 | ||
42 | //____________________________________________________________________________ | |
43 | AliCaloTrackESDReader::AliCaloTrackESDReader() : | |
44 | AliCaloTrackReader() | |
45 | { | |
78219bac | 46 | //Default Ctor |
47 | ||
48 | //Initialize parameters | |
49 | fDataType=kESD; | |
50 | fReadStack = kTRUE; | |
51 | fReadAODMCParticles = kFALSE; | |
1c5acb87 | 52 | |
0ae57829 | 53 | } |
1c5acb87 | 54 | |
55 | //____________________________________________________________________________ | |
477d6cee | 56 | void AliCaloTrackESDReader::SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) { |
57 | // Connect the data pointers | |
58 | ||
c8fe2783 | 59 | Bool_t tesd = kFALSE ; |
60 | ||
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 | } |