Good Support January 19, 2008Posted by gordonwatts in ROOT.
I complain about ROOT a lot. However, one thing I have to say is that when you report a bug it is only a matter of days before it gets fixed in their source code repository. Philippe Canal just did a whole bunch of work after I found a few bugs in the MakeProxy code that means it will now be possible to use weird variables like vector<vector<double> > without having to think (these are produced by the EventView tool in ATLAS). Nice!
BTW, MakeProxy is a step back in time. Remember PAW (ok, I know, some of you are still using it). One of the nice things about the FORTRAN macros back then was the auto-loading of ntuple columns. Only what you referenced in your FORTRAN code was loaded. That isn’t the case in ROOT — it has no good way to scan compiled C++ code to determine what is used. Philippe wrote an automatic proxy-generator that replaces each ntuple branch with a bit of code that first makes sure the data is read in before accessing it (I’m pretty sure Philippe was the progenitor of the idea). In the end this has the effect of doing the same thing — only what is needed is read. I’ve seen x10 speed-ups caused by this. The only it can’t do is look inside a custom compiled object — so this doesn’t buy you as much if you are running in that case.
Otherwise, I definitely recommend checking out TTree::MakeProxy.