Question on new functionality

On the release note I read:

Add support for automatic setting of pointer data members to the relevant object in the output list. The use of fOutputList->FindObject(“name”) in TSelector::Terminate is not needed anymore for pointer data members, e.g. histograms.

can someone give me an example? I think it’s userful, but I’m not sure to have understood


if you have in your TSelector header an pointer like:

TH1F *hist1;

And in the Begin():

hist1= 0;

and in the selector code (SlaveBegin() or Process()) you add an object with the name “hist1” to the output list:

hist1 = new TH1F(“hist1”, …);

then in Terminate() the system will set:

hist1 to point to the object named “hist1” in the output list. So in Terminate() you can do:


without having to do first:

hist1 = dynamic_cast<TH1F*>(fOutput->FindObject(“hist1”));

Cheers, Fons.