ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided
When I am running a macro from Rootv7 tutorials first time it works properly but when I again run it then it is throwing these errors:
error: no member named 'Fill' in 'std::unique_ptr<ROOT::Experimental::RNTupleWriter,
std::default_delete<ROOT::Experimental::RNTupleWriter> >'
ntuple->Fill();
~~~~~~ ^
Ok so the problem is probably what I pointed out above. There are some easy workarounds:
instead of entering the ROOT prompt, depending on what you need to do you can just run the macro from your shell: root -l -q macroname.C
alternatively, you can load the contents of the macro once with .L macroname.C, and then invoke its “main” function as many times as you want: macroname(); macroname()