Changeset 6949 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 04/18/05 10:35:54 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH.cc
r6948 r6949 771 771 // Rename first statistics box 772 772 // 773 TPaveStats *s1 = (TPaveStats*)gPad->FindObject("stats");773 TPaveStats *s1 = dynamic_cast<TPaveStats*>(gPad->FindObject("stats")); 774 774 if (!s1) 775 s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats");775 s1 = dynamic_cast<TPaveStats*>(hist1.GetListOfFunctions()->FindObject("stats")); 776 776 else 777 777 s1->SetName((TString)"Stat"+hist1.GetTitle()); … … 793 793 // Draw Legend 794 794 // 795 TPaveStats *s2 = (TPaveStats*)gPad->FindObject("stats");795 TPaveStats *s2 = dynamic_cast<TPaveStats*>(gPad->FindObject("stats")); 796 796 if (!s2) 797 s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats");797 s2 = dynamic_cast<TPaveStats*>(hist2.GetListOfFunctions()->FindObject("stats")); 798 798 799 799 if (s2) … … 866 866 // 867 867 // 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")); 869 869 if (!s1) 870 s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats");870 s1 = dynamic_cast<TPaveStats*>(hist1.GetListOfFunctions()->FindObject("stats")); 871 871 else 872 872 s1->SetName((TString)"Stat"+hist1.GetTitle()); … … 889 889 // 890 890 // 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")); 892 892 if (!s2) 893 s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats");893 s2 = dynamic_cast<TPaveStats*>(hist2.GetListOfFunctions()->FindObject("stats")); 894 894 895 895 if (s2)
Note:
See TracChangeset
for help on using the changeset viewer.