StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CTH.hh
1 /***************************************************************************
2  *
3  * $Id: CTH.hh,v 1.2 2001/06/21 19:15:45 laue Exp $
4  *
5  * Author: Frank Laue, Ohio State, laue@bnl.gov
6  ***************************************************************************
7  *
8  * Description: part of STAR HBT Framework: StHbtMaker package
9  * Histogram classes (inherited from TH?Ds) which
10  * will be listed by the StHbtHistoCollector
11  *
12  ***************************************************************************
13  *
14  * $Log: CTH.hh,v $
15  * Revision 1.2 2001/06/21 19:15:45 laue
16  * Modified fiels:
17  * CTH.hh : new constructor added
18  * StHbtEvent, StHbtKink, StHbtTrack : constructors from the persistent
19  * (TTree) classes added
20  * StHbtLikeSignAnalysis : minor changes, for debugging
21  * StHbtTypes: split into different files
22  * Added files: for the new TTree muDst's
23  * StExceptions.cxx StExceptions.hh StHbtEnumeration.hh
24  * StHbtHelix.hh StHbtHisto.hh StHbtString.hh StHbtTFile.hh
25  * StHbtTTreeEvent.cxx StHbtTTreeEvent.h StHbtTTreeKink.cxx
26  * StHbtTTreeKink.h StHbtTTreeTrack.cxx StHbtTTreeTrack.h
27  * StHbtTTreeV0.cxx StHbtTTreeV0.h StHbtVector.hh
28  *
29  * Revision 1.1 2000/09/05 14:21:10 laue
30  * NEW !! A histogram class (CTH, inherited from TH?Ds) that puts itself into
31  * a list (StHbtHistoCollector) at instantiation time. This provides an easy
32  * way to write out all the histograms.
33  *
34  **************************************************************************/
35 #ifndef CTH_hh
36 #define CTH_hh
37 
38 #include "TH1.h"
39 #include "TH2.h"
40 #include "TH3.h"
41 
42 #include "StHbtMaker/Infrastructure/StHbtHistoCollector.h"
43 #include "StChain.h"
44 
45 class CTH1D : public TH1D {
46 public:
47  CTH1D(): TH1D(){
48  StHbtHistoCollector* collector = StHbtHistoCollector::Instance();
49  collector->Add(this);
50  }
51  CTH1D(const char* name, const char* title,
52  Int_t nbinsx, Axis_t xlow, Axis_t xup) : TH1D(name, title, nbinsx, xlow, xup){
53  StHbtHistoCollector* collector = StHbtHistoCollector::Instance();
54  collector->Add(this);
55  }
56  ClassDef(CTH1D,1)
57 };
58 
59 class CTH2D : public TH2D {
60 public:
61  CTH2D() : TH2D(){
62  StHbtHistoCollector* collector = StHbtHistoCollector::Instance();
63  collector->Add(this);
64  }
65  CTH2D(const char* name, const char* title,
66  Int_t nbinsx, Axis_t xlow, Axis_t xup,
67  Int_t nbinsy, Axis_t ylow, Axis_t yup) : TH2D(name, title, nbinsx, xlow, xup, nbinsy, ylow, yup){
68  StHbtHistoCollector* collector = StHbtHistoCollector::Instance();
69  collector->Add(this);
70  }
71  ClassDef(CTH2D,1)
72 };
73 
74 class CTH3D : public TH3D {
75 public:
76  CTH3D() : TH3D(){
77  StHbtHistoCollector* collector = StHbtHistoCollector::Instance();
78  collector->Add(this);
79  }
80  CTH3D(const char* name, const char* title,
81  Int_t nbinsx, Axis_t xlow, Axis_t xup,
82  Int_t nbinsy, Axis_t ylow, Axis_t yup,
83  Int_t nbinsz, Axis_t zlow, Axis_t zup) : TH3D(name, title, nbinsx, xlow, xup, nbinsy, ylow, yup, nbinsz, zlow, zup){
84  StHbtHistoCollector* collector = StHbtHistoCollector::Instance();
85  collector->Add(this);
86  }
87  ClassDef(CTH3D,1)
88 };
89 
90 
91 
92 #endif
93 
Definition: CTH.hh:45
Definition: CTH.hh:74
Definition: CTH.hh:59