Changeset 1300 for trunk/MagicSoft/Mars/mhist/MH.cc
- Timestamp:
- 04/25/02 11:21:46 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MH.cc
r1283 r1300 50 50 51 51 #include <TH1.h> 52 #include <TH2.h> 53 #include <TH3.h> 52 54 #include <TCanvas.h> 53 55 … … 136 138 } 137 139 138 void MH::SetBinning(TH 1*h, const MBinning *binsx, const MBinning *binsy)140 void MH::SetBinning(TH2 *h, const MBinning *binsx, const MBinning *binsy) 139 141 { 140 142 TAxis &x = *h->GetXaxis(); … … 169 171 } 170 172 171 void MH::SetBinning(TH 1*h, const MBinning *binsx, const MBinning *binsy, const MBinning *binsz)173 void MH::SetBinning(TH3 *h, const MBinning *binsx, const MBinning *binsy, const MBinning *binsz) 172 174 { 173 175 // … … 214 216 } 215 217 216 void MH::SetBinning(TH 1*h, const TArrayD *binsx, const TArrayD *binsy)218 void MH::SetBinning(TH2 *h, const TArrayD *binsx, const TArrayD *binsy) 217 219 { 218 220 MBinning bx; … … 223 225 } 224 226 225 void MH::SetBinning(TH 1*h, const TArrayD *binsx, const TArrayD *binsy, const TArrayD *binsz)227 void MH::SetBinning(TH3 *h, const TArrayD *binsx, const TArrayD *binsy, const TArrayD *binsz) 226 228 { 227 229 MBinning bx; … … 245 247 } 246 248 247 void MH::SetBinning(TH 1*h, const TAxis *binsx, const TAxis *binsy)249 void MH::SetBinning(TH2 *h, const TAxis *binsx, const TAxis *binsy) 248 250 { 249 251 const Int_t nx = binsx->GetNbins(); … … 260 262 } 261 263 262 void MH::SetBinning(TH 1*h, const TAxis *binsx, const TAxis *binsy, const TAxis *binsz)264 void MH::SetBinning(TH3 *h, const TAxis *binsx, const TAxis *binsy, const TAxis *binsz) 263 265 { 264 266 const Int_t nx = binsx->GetNbins(); … … 281 283 void MH::SetBinning(TH1 *h, TH1 *x) 282 284 { 283 SetBinning(h, x->GetXaxis(), x->GetYaxis(), x->GetZaxis()); 284 } 285 if (h->InheritsFrom(TH3::Class()) && x->InheritsFrom(TH3::Class())) 286 { 287 SetBinning((TH3*)h, x->GetXaxis(), x->GetYaxis(), x->GetZaxis()); 288 return; 289 } 290 if (h->InheritsFrom(TH2::Class()) && x->InheritsFrom(TH2::Class())) 291 { 292 SetBinning((TH2*)h, x->GetXaxis(), x->GetYaxis()); 293 return; 294 } 295 if (h->InheritsFrom(TH1::Class()) && x->InheritsFrom(TH1::Class())) 296 { 297 SetBinning(h, x->GetXaxis()); 298 return; 299 } 300 }
Note:
See TracChangeset
for help on using the changeset viewer.