MakeClass variant for files with histos?

If I have a root file with a TTree, I can produce code to read such a tree with MakeClass. If I instead have a root file with a (long) list of histograms, is there any corresponding way to quickly produce code that reads these histos?

Look at $ROOTSYS/tutorials/io/loopdir.C