Passing an object reference from compiled c++ to a macro

Dear all,

How can I pass an object reference from compiled c++ code to a macro being executed with either gROOT->Macro(…) or gROOT->ProcessLine(".X …"); ?

I saw an example using the ListOfSpecials in gROOT, but to retrieve it I then need to know the name, which I don’t. I could pass the name to the macro as well, through another object, but there might be a better way of doing this.

Thanks in advance,

Hi Barth,

Here is an concrete example (from TGuiFactory.cxx):

Cheers, Bertrand.

Hi Bertrand,

Thanks a lot, it is exactly what I was looking for (but couldn’t find in the documentation).