Ignore:
Timestamp:
04/18/05 10:35:54 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r6948 r6949  
    771771    // Rename first statistics box
    772772    //
    773     TPaveStats *s1 = (TPaveStats*)gPad->FindObject("stats");
     773    TPaveStats *s1 = dynamic_cast<TPaveStats*>(gPad->FindObject("stats"));
    774774    if (!s1)
    775         s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats");
     775        s1 = dynamic_cast<TPaveStats*>(hist1.GetListOfFunctions()->FindObject("stats"));
    776776    else
    777777        s1->SetName((TString)"Stat"+hist1.GetTitle());
     
    793793    // Draw Legend
    794794    //
    795     TPaveStats *s2 = (TPaveStats*)gPad->FindObject("stats");
     795    TPaveStats *s2 = dynamic_cast<TPaveStats*>(gPad->FindObject("stats"));
    796796    if (!s2)
    797         s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats");
     797        s2 = dynamic_cast<TPaveStats*>(hist2.GetListOfFunctions()->FindObject("stats"));
    798798
    799799    if (s2)
     
    866866    //
    867867    // Where to get the TPaveStats depends on the root version
    868     TPaveStats *s1 = (TPaveStats*)gPad->FindObject("stats");
     868    TPaveStats *s1 = dynamic_cast<TPaveStats*>(gPad->FindObject("stats"));
    869869    if (!s1)
    870         s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats");
     870        s1 = dynamic_cast<TPaveStats*>(hist1.GetListOfFunctions()->FindObject("stats"));
    871871    else
    872872        s1->SetName((TString)"Stat"+hist1.GetTitle());
     
    889889    //
    890890    // Where to get the TPaveStats depends on the root version
    891     TPaveStats *s2 = (TPaveStats*)gPad->FindObject("stats");
     891    TPaveStats *s2 = dynamic_cast<TPaveStats*>(gPad->FindObject("stats"));
    892892    if (!s2)
    893         s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats");
     893        s2 = dynamic_cast<TPaveStats*>(hist2.GetListOfFunctions()->FindObject("stats"));
    894894
    895895    if (s2)
Note: See TracChangeset for help on using the changeset viewer.