I want to load a macro (I know the path and name of if, that means I can access the macro) and then try to find out, what signature this macro has. For example:
User gives path (whatever) and name (“say myMacro.C”)
Now I want to check, whether the macro “myMacro” has the return type Bool_t and takes a Double*-Pointer as a parameter, i.e. the signature looks like:
“Bool_t myMacro(Double_t* someParameter)”
At the moment I use TEveMacro to open the macro file, then get the lines in it and check whether one line contains this signature. But I do not really like this method for some reasons.
I think it might be possible to do it in a different way. Maybe one can use CINT to do it because when I load a macro in CINT via .L myMacro.C, CINT knows the signature (you can press “tab” and you will see it).
(and similar functions). The same problem for the second parameter. But I want to check, whether the third parameter is really a reference of type integer and not a double or a non-reference integer, …
My idea is to load a macro, use GetGlobalFunctionWithPrototype and check, whether the return value is 0x0. If so, the macro has not the correct signature.
Is there a way to fix the problem mentioned above?
It does not look beautiful, but it does its job. To find the correct comparison sequence “ParameterSomeCharacters”, one can first import a macro with the correct signature and check its mangled name.