Ignore:
Timestamp:
07/25/02 13:58:19 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r1389 r1441  
    317317    }
    318318}
     319
     320void MH::ScaleAxis(TArrayD &bins, Double_t f)
     321{
     322    for (int i=0; i<bins.GetSize(); i++)
     323        bins[i] *= f;
     324}
     325
     326void MH::ScaleAxis(TH1 *h, Double_t fx=1, Double_t fy=1, Double_t fz=1)
     327{
     328    if (h->InheritsFrom(TH3::Class()))
     329        ScaleAxis(*((TH3*)h)->GetZaxis()->GetXbins(), fz);
     330
     331    if (h->InheritsFrom(TH2::Class()))
     332        ScaleAxis(*((TH2*)h)->GetYaxis()->GetXbins(), fy);
     333
     334    if (h->InheritsFrom(TH1::Class()))
     335        ScaleAxis(*h->GetXaxis()->GetXbins(), fx);
     336}
Note: See TracChangeset for help on using the changeset viewer.