]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrBase/AliAnaPartCorrMaker.h
3e70b350e3d99c2eaac7111f039099fac7b04f9a
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliAnaPartCorrMaker.h
1 #ifndef ALIANAPARTCORRMAKER_H
2 #define ALIANAPARTCORRMAKER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id:  $ */
6
7 //_________________________________________________________________________
8 // Steering class for particle (gamma, hadron) identification and correlation analysis
9 // It is called by the task class AliAnalysisTaskParticleCorrelation and it connects the input 
10 // (ESD/AOD/MonteCarlo) got with AliCaloTrackReader (produces TObjArrays of AODs 
11 // (TParticles in MC case if requested)), with the 
12 // analysis classes that derive from AliAnaPartCorrBaseClass
13 //
14 // -- Author: Gustavo Conesa (INFN-LNF)
15
16 // --- ROOT system ---
17 class TList; 
18 class TClonesArray;
19 #include<TObject.h>
20 class TString;
21
22 // --- Analysis system ---
23 class AliCaloTrackReader ;
24
25 class AliAnaPartCorrMaker : public TObject {
26
27  public: 
28   
29   AliAnaPartCorrMaker() ; // default ctor
30   AliAnaPartCorrMaker(const AliAnaPartCorrMaker & maker) ; // cpy ctor
31   virtual ~AliAnaPartCorrMaker() ; //virtual dtor
32
33  private:
34   AliAnaPartCorrMaker & operator = (const AliAnaPartCorrMaker & ) ;//cpy assignment
35
36  public:
37         
38   //Setter and getters
39   TList * GetAODBranchList() ;
40   TList * GetOutputContainer() ;
41
42   Int_t GetAnaDebug() const  { return fAnaDebug ; }
43   void SetAnaDebug(Int_t d)  { fAnaDebug = d ; }
44         
45   Bool_t AreHistogramsMade() const { return fMakeHisto ; }
46   void SwitchOnHistogramsMaker()   { fMakeHisto = kTRUE ; }
47   void SwitchOffHistogramsMaker()  { fMakeHisto = kFALSE ; }
48  
49   Bool_t AreAODsMade() const { return fMakeAOD ; }
50   void SwitchOnAODsMaker()   { fMakeAOD = kTRUE ; }
51   void SwitchOffAODsMaker()  { fMakeAOD = kFALSE ; }
52   
53   void Terminate(TList * outputList);
54
55   void AddAnalysis(TObject* ana, Int_t n) {
56     if ( fAnalysisContainer) fAnalysisContainer->AddAt(ana,n); 
57     else { printf("AliAnaPartCorrMaker::AddAnalysis() - AnalysisContainer not initialized\n");
58       abort();}
59   }
60   
61   AliCaloTrackReader * GetReader() const {return fReader ; }
62   void SetReader(AliCaloTrackReader * const reader) { fReader = reader ; }
63         
64   //Others
65   void Init();
66   void InitParameters();
67   
68   void Print(const Option_t * opt) const;
69   
70   void ProcessEvent(const Int_t iEntry, const char * currentFileName) ;
71   
72  private:
73   
74   //General Data members
75   
76   TList * fOutputContainer ; // output histograms container
77   TList * fAnalysisContainer ; // List with analysis pointers
78   Bool_t  fMakeHisto ; // If true makes final analysis with histograms as output
79   Bool_t  fMakeAOD ; // If true makes analysis generating AODs
80   Int_t   fAnaDebug; // Debugging info.
81  
82   AliCaloTrackReader *  fReader ;   // Pointer to reader 
83   TList * fAODBranchList ;          //! List with AOD branches created and needed in analysis
84
85   ClassDef(AliAnaPartCorrMaker,2)
86 } ;
87  
88
89 #endif //ALIANAPARTCORRMAKER_H
90
91
92