Avoiding to restart root all the time

Hello!
I am a root user at a beginner/intermediate level, and I found something strange with root macros.
It often happens to me that, if I run a macro, the first run works fine, but then the other runs (I mean, running the same macro with a slightly modified parameter, for example) don’t work, or give me some errors. Then I have to quit root and run the modified macro, which will now work perfectly.

The question is:
Is there a command to “clean up” or “refresh” root after a I run macro, or do I have to quit and restart all the time?

Thank you!

I guess you use root6,
then look at this:

[url]How to reload macro in root6

Otto

Thank you! That was precisely my issue, but according to the link you gave me, it appears that there is no solution.

[quote]if I run a macro, the first run works fine, but then the other runs (I mean, running the same macro with a slightly modified parameter,[/quote]That depends on how you modify the parameters.

If you actually change the source file, then this requires unloading the previous incarnation and reloading. This is currently a bit cranky/fragile but we are actively improving this.

If you just change the input to a function, you can safely do:

.L MyMacroWithFunction.C
func(value1);
func(value2);
etc ...

Cheers,
Philippe.