Using MakeClass with TTreeReader method

Dear experts,

I am wondering whether it is possible to use MakeClass() to create an analyzer that reads a tree using the TTreeReader method, and not the SetBranchAddress method? TTreeReader loops much faster than the old SetBranchAddress but I cannot find a way to quickly build up the .cc and .h files as MakeClass does.

Thank you,
David

For the TTreeReader class, see the result of TTree:MakeSelector when run with ROOT 6.06 or newer.

But if I understand correctly the way TSelector works, I still have to write the TTreeReader variables myslef, is that right? In this case I don’t see the advantage with respect to writing my own macro. What is nice with MakeClass is that everything is written already, you simply have to do whatever you want to in the loop. Do I understand this correctly?

Thank you

Not quite. :). Please see the output of MakeSelector.

Cheers,
Philippe.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.