]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrBase/AliAnaPartCorrMaker.h
dae69630379d57513581643db2707f25c69b5da6
[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 class TH1I;
22
23 // --- Analysis system ---
24 class AliCaloTrackReader ;
25
26 class AliAnaPartCorrMaker : public TObject {
27
28  public: 
29   
30   AliAnaPartCorrMaker() ; // default ctor
31   AliAnaPartCorrMaker(const AliAnaPartCorrMaker & maker) ; // cpy ctor
32   virtual ~AliAnaPartCorrMaker() ; //virtual dtor
33
34  private:
35   AliAnaPartCorrMaker & operator = (const AliAnaPartCorrMaker & ) ;//cpy assignment
36
37  public:
38         
39   //Setter and getters
40   TList * GetAODBranchList() ;
41   TList * GetOutputContainer() ;
42
43   Int_t GetAnaDebug() const  { return fAnaDebug ; }
44   void SetAnaDebug(Int_t d)  { fAnaDebug = d ; }
45         
46   Bool_t AreHistogramsMade() const { return fMakeHisto ; }
47   void SwitchOnHistogramsMaker()   { fMakeHisto = kTRUE ; }
48   void SwitchOffHistogramsMaker()  { fMakeHisto = kFALSE ; }
49  
50   Bool_t AreAODsMade() const { return fMakeAOD ; }
51   void SwitchOnAODsMaker()   { fMakeAOD = kTRUE ; }
52   void SwitchOffAODsMaker()  { fMakeAOD = kFALSE ; }
53   
54   void Terminate(TList * outputList);
55
56   void AddAnalysis(TObject* ana, Int_t n) {
57     if ( fAnalysisContainer) fAnalysisContainer->AddAt(ana,n); 
58     else { printf("AliAnaPartCorrMaker::AddAnalysis() - AnalysisContainer not initialized\n");
59       abort();}
60   }
61   
62   AliCaloTrackReader * GetReader() const {return fReader ; }
63   void SetReader(AliCaloTrackReader * const reader) { fReader = reader ; }
64         
65   //Others
66   void Init();
67   void InitParameters();
68   
69   void Print(const Option_t * opt) const;
70   
71   void ProcessEvent(const Int_t iEntry, const char * currentFileName) ;
72   
73  private:
74   
75   //General Data members
76   
77   TList * fOutputContainer ;   //! output histograms container
78   TList * fAnalysisContainer ; //! List with analysis pointers
79   Bool_t  fMakeHisto ; // If true makes final analysis with histograms as output
80   Bool_t  fMakeAOD ; // If true makes analysis generating AODs
81   Int_t   fAnaDebug; // Debugging info.
82  
83   AliCaloTrackReader *  fReader ;   //! Pointer to reader 
84   TList * fAODBranchList ;          //! List with AOD branches created and needed in analysis
85
86   TH1I *fhNEvents;                  //! Number of events counter histogram
87         
88   ClassDef(AliAnaPartCorrMaker,3)
89 } ;
90  
91
92 #endif //ALIANAPARTCORRMAKER_H
93
94
95