9 #ifndef ClassStMultiH2F
10 #define ClassStMultiH2F
15 #define StMultiH2FMaxBins 10
21 StMultiH2F(
const char *name,
const char *title,Int_t nbinsx,Axis_t xlow,
22 Axis_t xup,Int_t nbinsy,Axis_t ylow,Axis_t yup,Int_t nbinsz);
24 virtual void Draw(Option_t *option=
"");
26 virtual void Draw3F(Option_t *option=
"") { TH3F::Draw(option); }
28 virtual void SetNames(Int_t zbin,
const char* name)
29 {
if (zbin<StMultiH2FMaxBins) names[zbin] = name; }
30 virtual void SetNames(Float_t zbin,
const char* name)
31 { SetNames((Int_t) zbin, name); }
32 virtual const char* GetNames(Int_t zbin)
const
33 {
return (zbin<StMultiH2FMaxBins ? names[zbin].Data() : 0); }
34 virtual const char* GetNames(Float_t zbin)
const
35 {
return GetNames((Int_t) zbin); }
37 virtual TH1* Rebin(Int_t ngroup,
const char* newname)
38 { SetNames(ngroup, newname);
return 0; }
39 virtual TH1* Rebin(Int_t ngroup,
const char* newname,
const Double_t* xbins)
40 { SetNames(ngroup, newname);
return 0; }
41 virtual void SavePrimitive(std::ostream& out, Option_t* option =
"");
42 virtual TH2D* GetSubHist(Int_t zbin) {
return (subHists ? subHists[zbin] : 0); }
44 TString names[StMultiH2FMaxBins];
45 virtual TH2D* XYProjection(
const char* name, Int_t zbin=-1);