9 #ifndef ClassStMultiH1F
10 #define ClassStMultiH1F
14 #define StMultiH1FMaxBins 10
20 StMultiH1F(
const char *name,
const char *title,Int_t nbinsx,Axis_t xlow,
21 Axis_t xup,Int_t nbinsy);
22 StMultiH1F(
const char *name,
const char *title,Int_t nbinsx,Double_t *xbins,
25 virtual void Draw(Option_t *option=
"");
26 virtual void Draw2F(Option_t *option=
"") { TH2F::Draw(option); }
27 virtual void SetNames(Int_t ybin,
const char* name)
28 {
if (ybin<StMultiH1FMaxBins) names[ybin] = name; }
29 virtual void SetNames(Float_t ybin,
const char* name)
30 { SetNames((Int_t) ybin, name); }
31 virtual const char* GetNames(Int_t ybin)
const
32 {
return (ybin<StMultiH1FMaxBins ? names[ybin].Data() : 0); }
33 virtual const char* GetNames(Float_t ybin)
const
34 {
return GetNames((Int_t) ybin); }
36 virtual TH2* Rebin(Int_t ngroup,
const char* newname)
37 { SetNames(ngroup, newname);
return 0; }
38 virtual TH2* Rebin(Int_t ngroup,
const char* newname,
const Double_t* xbins)
39 { SetNames(ngroup, newname);
return 0; }
41 virtual void SetBarOffset(Float_t offset);
42 virtual Double_t GetNonZeroMinimum()
const;
43 virtual Double_t GetNonZeroMaximum()
const;
44 virtual void SavePrimitive(std::ostream& out, Option_t* option =
"");
45 virtual TH1F* GetSubHist(Int_t ybin) {
return (subHists ? subHists[ybin] : 0); }
46 virtual TH1F* GetAHist() {
return aHist; }
49 virtual Int_t
Write(
const char *name=0, Int_t option=0, Int_t bufsize=0);
52 TString names[StMultiH1FMaxBins];
54 virtual TH1F* XProjection(
const char* name, Int_t ybin=-1);
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Saves subhistograms (TH1F) along with this composite object.