Changeset 10283 for trunk/Mars/mhbase


Ignore:
Timestamp:
04/04/11 13:40:22 (14 years ago)
Author:
tbretz
Message:
Added asignment of conversion function of TProfile2D.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhbase/MH3.cc

    r10282 r10283  
    970970void MH3::Convert(TH1 &h) const
    971971{
    972     const Bool_t prof = h.InheritsFrom(TProfile::Class()) || h.InheritsFrom(TProfile2D::Class());
     972    const Bool_t prof = h.InheritsFrom(TProfile::Class()) || h.InheritsFrom(TProfile2D::Class()) || h.InheritsFrom(TProfile3D::Class());
    973973
    974974    for (Int_t z=0; z<=h.GetNbinsZ()+1; z++)
     
    994994        for (Int_t i=0; i<p2->GetSize(); i++)
    995995            static_cast<TProfile2D&>(h).SetBinEntries(i, p2->GetBinEntries(i)>0 ? 1 : 0);
     996
     997    TProfile3D *p3 = dynamic_cast<TProfile3D*>(fHist);
     998    if (p3)
     999        for (Int_t i=0; i<p3->GetSize(); i++)
     1000            static_cast<TProfile3D&>(h).SetBinEntries(i, p3->GetBinEntries(i)>0 ? 1 : 0);
    9961001}
    9971002
Note: See TracChangeset for help on using the changeset viewer.