16 #include "Riostream.h"
25 fiDim(0),fiNbinX(0), fiNbinY(0), fiNbinZ(0),
26 fdXmin(0), fdXmax(0), fdYmin(0), fdYmax(0), fdZmin(0), fdZmax(0),
27 fdEntries(0), fdXmean(0), fdYmean(0), fdZmean(0),
28 fdXrms(0), fdYrms(0), fdZrms(0)
30 GO4TRACE((14,
"TGo4HistogramStatus::TGo4HistogramStatus(TH1*)",__LINE__, __FILE__));
34 fiDim=his->GetDimension();
38 TAxis* xax=his->GetXaxis();
47 TAxis* yax=his->GetYaxis();
56 TAxis* zax=his->GetZaxis();
71 if(his->InheritsFrom(TH1D::Class()))
73 TH1D* dhis=
dynamic_cast<TH1D*
>(his);
74 fieldsize=
sizeof(Double_t)*dhis->GetSize();
76 else if(his->InheritsFrom(TH1F::Class()))
78 TH1F* fhis=
dynamic_cast<TH1F*
>(his);
79 fieldsize=
sizeof(Float_t)*fhis->GetSize();
81 else if(his->InheritsFrom(TH1I::Class()))
83 TH1I* ihis=
dynamic_cast<TH1I*
>(his);
84 fieldsize=
sizeof(Int_t)*ihis->GetSize();
86 else if(his->InheritsFrom(TH1S::Class()))
88 TH1S* shis=
dynamic_cast<TH1S*
>(his);
89 fieldsize=
sizeof(Short_t)*shis->GetSize();
91 else if(his->InheritsFrom(TH1C::Class()))
93 TH1C* chis=
dynamic_cast<TH1C*
>(his);
94 fieldsize=
sizeof(Char_t)*chis->GetSize();
96 else if(his->InheritsFrom(TH2D::Class()))
98 TH2D* dhis=
dynamic_cast<TH2D*
>(his);
99 fieldsize=
sizeof(Double_t)*dhis->GetSize();
101 else if(his->InheritsFrom(TH2F::Class()))
103 TH2F* fhis=
dynamic_cast<TH2F*
>(his);
104 fieldsize=
sizeof(Float_t)*fhis->GetSize();
106 else if(his->InheritsFrom(TH2I::Class()))
108 TH2I* ihis=
dynamic_cast<TH2I*
>(his);
109 fieldsize=
sizeof(Int_t)*ihis->GetSize();
111 else if(his->InheritsFrom(TH2S::Class()))
113 TH2S* shis=
dynamic_cast<TH2S*
>(his);
114 fieldsize=
sizeof(Short_t)*shis->GetSize();
116 else if(his->InheritsFrom(TH2C::Class()))
118 TH2C* chis=
dynamic_cast<TH2C*
>(his);
119 fieldsize=
sizeof(Char_t)*chis->GetSize();
121 else if(his->InheritsFrom(TH3D::Class()))
123 TH3D* dhis=
dynamic_cast<TH3D*
>(his);
124 fieldsize=
sizeof(Double_t)*dhis->GetSize();
126 else if(his->InheritsFrom(TH3F::Class()))
128 TH3F* fhis=
dynamic_cast<TH3F*
>(his);
129 fieldsize=
sizeof(Float_t)*fhis->GetSize();
131 else if(his->InheritsFrom(TH3I::Class()))
133 TH3I* ihis=
dynamic_cast<TH3I*
>(his);
134 fieldsize=
sizeof(Int_t)*ihis->GetSize();
136 else if(his->InheritsFrom(TH3S::Class()))
138 TH3S* shis=
dynamic_cast<TH3S*
>(his);
139 fieldsize=
sizeof(Short_t)*shis->GetSize();
141 else if(his->InheritsFrom(TH3C::Class()))
143 TH3C* chis=
dynamic_cast<TH3C*
>(his);
144 fieldsize=
sizeof(Char_t)*chis->GetSize();
169 fiDim(0),fiNbinX(0), fiNbinY(0), fiNbinZ(0),
170 fdXmin(0), fdXmax(0), fdYmin(0), fdYmax(0), fdZmin(0), fdZmax(0),
171 fdEntries(0), fdXmean(0), fdYmean(0), fdZmean(0),
172 fdXrms(0), fdYrms(0), fdZrms(0)
174 GO4TRACE((14,
"TGo4HistogramStatus::TGo4HistogramStatus()",__LINE__, __FILE__));
181 GO4TRACE((14,
"TGo4HistogramStatus::TGo4HistogramStatus()",__LINE__, __FILE__));
190 GO4TRACE((12,
"TGo4HistogramStatus::PrintStatus()",__LINE__, __FILE__));
192 if(buflen<=0 && buffer!=0)
194 Int_t locallen=128000;
195 Text_t localbuf[128000];
197 Text_t* current=localbuf;
198 Int_t restlen=locallen;
203 current=
PrintBuffer(current,restlen,
"G-OOOO-> Histogram Status Class Printout <-OOOO-G\n");
205 current=
PrintBuffer(current,restlen,
"G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
252 current=
PrintBuffer(current,restlen,
"G-OOOO-> ---------------------------------------------- <-OOOO-G\n");
255 std::cout << localbuf << std::endl;
259 size=locallen-restlen;
262 strncpy(buffer,localbuf,size);
static Text_t * PrintIndent(Text_t *buffer, Int_t &buflen)
virtual ~TGo4HistogramStatus()
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
virtual Int_t PrintStatus(Text_t *buffer=0, Int_t buflen=0)
static Text_t * PrintBuffer(char *buffer, Int_t &buflen, const char *text,...)