Hi,
I have a namespace with functions:
namespace KVTGIDFunctions {
Double_t tassangot_Z(Double_t * x, Double_t * par);
}
which is included in the dictionary using
#pragma link C++ namespace KVTGIDFunctions;
How can I get the addresses of these functions using TClass/TMethod etc. ?
On the Cint command line I get:
root [22] KVTGIDFunctions::tassangot_Z
(const void*)0x32873c8
so I assume it must be possible, but all I have managed so far is:
TClasscl=gROOT->GetClass(“KVTGIDFunctions”)
TMethodmeth=cl->GetMethodAny(“tassangot_Z”)
root [18] meth->InterfaceMethod()
(const void*)0x33264ae
InterfaceMethod is the only method I found returning a ‘void*’, but the
address is not the right one, so I guess it’s wrong.
Thanks for your help
John
PS. the point of all this is to reinitialise the ‘lost’ function pointers of TF1 objects read from a file using the name of the appropriate function to search for the pointer (there are more than one functions in the namespace).