Skip to content

Commit

Permalink
[thstack] simplify THStack::Print()
Browse files Browse the repository at this point in the history
No need to cast histograms to call Print() methods
  • Loading branch information
linev committed Mar 6, 2024
1 parent 1233705 commit ce7f33d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions hist/hist/src/THStack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -989,13 +989,9 @@ void THStack::BuildAndPaint(Option_t *choptin, Bool_t paint)

void THStack::Print(Option_t *option) const
{
TH1 *h;
if (fHists) {
TIter next(fHists);
while ((h = (TH1*) next())) {
h->Print(option);
}
}
TIter next(fHists);
while (auto h = next())
h->Print(option);
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit ce7f33d

Please sign in to comment.