Changeset 10283


Ignore:
Timestamp:
Apr 4, 2011, 1:40:22 PM (10 years ago)
Author:
tbretz
Message:
Added asignment of conversion function of TProfile2D.
Location:
trunk/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/Changelog

    r10282 r10283  
    4747   * mhbase/MH3.cc:
    4848     - fixed a problem with a wrong cast
     49     - added assignment of conversion function for TProfile3D
    4950
    5051
  • 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.