Changeset 17125 for trunk/Mars/mhbase


Ignore:
Timestamp:
09/07/13 10:25:43 (11 years ago)
Author:
tbretz
Message:
Secured PostProcess agianst never initialized fH, add the fH Clone to the pad directly ourselves.
File:
1 edited

Legend:

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

    r9315 r17125  
    581581Int_t MFillH::PostProcess()
    582582{
     583    // Return if fH was never initialized.
     584    if (!fH)
     585        return kTRUE;
     586
    583587    //
    584588    // Now all data is in the histogram. Maybe some final action is
     
    602606    {
    603607        const TString opt(MString::Format("nonew %s", fDrawOption.Data()));
    604         fCanvas->cd();
     608        // fCanvas->cd();
     609        // fCanvas->Clear();
     610
    605611        // Remove the old class to prevent clashes calling
    606612        // Paint-functions when the display is updated
    607613        fCanvas->GetListOfPrimitives()->Remove(fH);
    608         // DrawClone also takes care of calling gPad->Clear()
    609         fH->DrawClone(opt);
     614        fCanvas->GetListOfPrimitives()->Add(fH->Clone(), opt);
    610615        fCanvas->Modified();
    611616        fCanvas->Update();
Note: See TracChangeset for help on using the changeset viewer.