Reload macro issue in pyROOT

Hi all,

I am doing this:

gROOT.LoadMacro(“RunMe.cpp”)
gROOT.ProcessLine(“RunMe()”)

and everything goes well for the first time, but i need meanwhile to change the content of my macro, and then reload them.
When I try to reload a second time I have errors.

How can I reload my modified macro whithout problems please?

Thanks for help.

Hiba

Hi Hiba,

I cannot reproduce with ‘master’. Can you please provide more information? Platform, ROOT version, etc.
Cheers
Pere

HI,

that or at least post the macro … Also, this is not a PyROOT issue, as you’re executing a C++ macro on the underlying interpreter. You’re better of working with that directly. Make sure to properly scope your macro to prevent redefinition problems.

Cheers,
Wim