StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEStructAnalysis.h
1 /**********************************************************************
2  *
3  * $Id: StEStructAnalysis.h,v 1.5 2012/11/16 21:19:05 prindle Exp $
4  *
5  * Author: Jeff Porter
6  *
7  **********************************************************************
8  *
9  * Description: Abstract analysis class
10  *
11  ***********************************************************************/
12 #ifndef _STEBYEANALYSIS_H
13 #define _STEBYEANALYSIS_H
14 
15 #include "TROOT.h"
16 #include "Stiostream.h"
17 #include "StEStructPool/AnalysisMaker/StEStructQAHists.h"
18 
19 class StEStructEvent;
20 class TFile;
21 
23 
24  protected:
25 
26  int manalysisIndex;
27 
28  public:
29 
32  virtual ~StEStructAnalysis() {};
33 
34  StEStructEventReader* mReader;
35 
36  virtual void setOutputFileName(const char* outFileName) = 0;
37  void setQAHists(StEStructQAHists* qaHists);
38  virtual bool doEvent(StEStructEvent* event) = 0;
39  virtual void finish() = 0;
40 
41  // new methods; should be pure-virtual but make it 'no-opt' so older codes
42  // won't be required to implement it
43  virtual void logStats(ostream& os){ /* no opt */ };
44  virtual void writeQAHists(TFile * tf){ /* no opt */ };
45  virtual void setAnalysisIndex(int i);
46  virtual int analysisIndex();
47  virtual void setEventReader(StEStructEventReader *reader);
48 
49  // called by the maker when one wants to do some periodic printouts
50  virtual void writeDiagnostics(){/* no opt*/ };
51 
52  ClassDef(StEStructAnalysis,1)
53 };
54 
55 
56 inline void StEStructAnalysis::setAnalysisIndex(int i){ manalysisIndex=i; };
57 inline int StEStructAnalysis::analysisIndex(){ return manalysisIndex; };
58 inline void StEStructAnalysis::setQAHists(StEStructQAHists* qahists){
59  mQAHists = qahists;
60 }
61 inline void StEStructAnalysis::setEventReader(StEStructEventReader *reader) {
62  mReader = reader;
63 }
64 
65 #endif
66 
67 /***********************************************************************
68  *
69  * $Log: StEStructAnalysis.h,v $
70  * Revision 1.5 2012/11/16 21:19:05 prindle
71  * Moved EventCuts, TrackCuts to EventReader. Affects most readers.
72  * Added support to write and read EStructEvents.
73  * Cuts: 3D histo support, switch to control filling of histogram for reading EStructEvents
74  * EventCuts: A few new cuts
75  * MuDstReader: Add 2D to some histograms, treat ToFCut, PrimaryCuts, VertexRadius histograms like other cut histograms.
76  * QAHists: Add refMult
77  * TrackCuts: Add some hijing cuts.
78  *
79  * Revision 1.4 2006/10/02 22:14:05 prindle
80  * Changed for QA histograms. Also addition of ppMinBiasYear5 as a data sample.
81  *
82  * Revision 1.3 2006/04/04 22:05:03 porter
83  * a handful of changes:
84  * - changed the StEStructAnalysisMaker to contain 1 reader not a list of readers
85  * - added StEStructQAHists object to contain histograms that did exist in macros or elsewhere
86  * - made centrality event cut taken from StEStructCentrality singleton
87  * - put in ability to get any max,min val from the cut class - one must call setRange in class
88  *
89  * Revision 1.2 2004/06/25 03:10:22 porter
90  * added a new common statistics output and added electron cut with momentum slices
91  *
92  * Revision 1.1 2003/10/15 18:20:31 porter
93  * initial check in of Estruct Analysis maker codes.
94  *
95  *
96  *********************************************************************/
97 
StEStructQAHists * mQAHists
may be needed for naming of many hists in same file
StEStructAnalysis()
for QA histogramming