TSelector::Version() and TTreePlayer


I’m using myChain->Process(mySelector) wihout PROOF. Eventually I’ve realized that TSelector::Init() method has never been called. Looking through TTreePlayer source, I’ve found that thing


if (selector->Version() >= 2)

But TSelector::Version() == 2 is not documented at all and I wonder what should I do: rewrite my selector to return Version() == 2 or somehow call mySelector->Init() by hand?

It also would be interesting to know what the undelying reason to call Init() in TTreePlayer in this way.


Best wishes, Eugeny Boger, JINR Dubna


in older, i.e. version<2 Selectors, the Init() method was called in the generated SlaveBegin() code. With currently generated (v2) Selectors Init() is not called anymore there, but as you’ve noticed, its called directly by the system. See for example the v1 selectors in $ROOTSYS/tutorials/tree/h1analysis.h and .C. Make sure your Init() is called at the right place. Or alternatively, regenerate your selector to get a v2 selector.

Cheers, Fons.