Macro loading in root6

Hello,

I still find the problems subject of this thread and reported as solved. When I use an unnamed macro, the second time I run it produces errors because all the variables are already defined.
gROOT->Reset(); apparently does no remove globals. Here is a minimal example
{
gROOT->Reset();
Int_t i=1;
}
the second execution with .x gives
/Users/pepe/Desktop/Radon Paper/macros/./test.C:4:11: error: redefinition of
’i’
Int_t i=1;
/Users/pepe/Desktop/Radon Paper/macros/./test.C:4:11: note: previous definition
is here
Int_t i=1;

This happens independently of using .x or .L and then .U

If on the other side I use a named macro say
void test(){gROOT->Reset(); Int_t i=1; cout<<i<<endl; }
there is no problem with redefinitions because they are not globals, but if I change i on disk, and save the file, ROOT does not see this change unless exiting and opening a new session.
Is there a point I am missing or it is a bug? This problem does not appear in ROOT5. I use ROOT6 on a macOSX running El Capitan, and the last version 6.06/08 installed from binaries.
Regards,

Jose

1 Like