Hi,
For convenience, I often call TH1::AddDirectory(0) to turn off Root’s tracking of histogram names. (Root sometimes seems to get confused and I find it safer to just manage the pointers/histograms myself.) However, this seems to make it impossible to project into a histogram from a tree. The TTree::Draw() and TTree:Project() methods rely on histogram names rather than pointers. Why is there no method that simply takes a pointer to the histogram I want to project into?
I can always make my own loop over the tree and fill the histogram myself, but that’s too much overheard for such a simple task.
Is there some easy way to do this?
-tom