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