How to scale all histos in a root file

Say I have a root file with subdirectories and histos in each subdirectory.
What’s the fastest way to scale all histos in the whole file with the same scale factor? Say I’m normalizing to some standard, and all histos in the file scale the same. I tried looking at some of the User Guide PDFs as well as the HOWTOs and the Tutorials, but saw no examples of this.

Thanks,
-Phil D.

Hi,

hadd.C (and TFileMerge.cxx) contains example on recursing through directly and applying an action on each object (in those adding), that you can use as a starter for your cases.

Cheers,
Philippe