How to reload macro in root6

Dear ROOT support,

after installing root 6.06 I found one very annoying problem. If I call a macro using usual .x macro.C command, then change this macro in editor while root session is running, and then run it again, root doesn’t recognize any new changes. Unloading it using .U command also doesn’t help. I have to quit root and start it again.

Is it a bug or a new feature in root6? It’s really very inconvenient…

Yuri.

1 Like

This issue is known and gets hopefully fixed soon:

[url]Macro loading in root6

Otto

That’s true with named macros. If you use un-named macros it works.

What is an unnamed macro?

atlas.fis.utfsm.cl/atlas/tutoria … tml#Macros

Thank you! And could you also please tell me the syntax to launch an un-named macro?
For named macros I use

if the macro looks like

void mymacro(){ ... }
And for un-named macros? Thanks!

same as a named macro

Thanks! I’ve tested it and it’s working. In fact, if I put the command gROOT->Reset() at the beginning of an unnamed macro, it updates all the parameters.
However, there is one last problem: with named macros I used to put functions definitions and declarations before the macro; this doesn’t work anymore with unnamed ones. Thank you!