TObject::Execute - calling a member method problem

Hi Philippe,

main motivation (not the only one!) for all the exercises with the Class{A,B,C} is to somehow call a C++ function which takes a pointer to another function as an argument from pyROOT because pyROOT doesn’t support it right know (it would be the best solution), see How to call function with pointer to a function argument?. So, I got an idea to do it indirectly passing a string (name of a function) instead of a pointer to the function. TObject::Execute and/or TMethodCall looked like good candidates to accomplish the task. I don’t need something as TFormula which can handle complex expresions such as sin(x*(x<0.5 || x>1)).

I would like not to introduce a dictionary - mapping between a pointer to a function and a string or something else because this would require an update whenever I define new function. I want to avoid this manual intervention. Moreover, it would be quite hard to implement this dictionary for member functions belonging to different classes and global non-member functions with different signatures.

Cheers,
Jiri