In a directory with a rootlogon.C, Jupyter notebook does not seem to execute the commands specified inside that file. Opening a ROOT interactive session, on the other hand, does pick the rootlogon.C. Is there a way to make this work for Jupyter Notebooks? It would be nice to hide away calls like R__LOAD_LIBRARY(libmylib).
Cheers,
Ahmad
ROOT Version: v6.18/04 Platform: Ubuntu 16.04 Compiler: Not Provided
Indeed right now rootlogon.C is not automatically loaded from a notebook. The reason is that the ROOT C++ kernel is actually implemented in Python, which takes what you write in the cell and forwards it as a string to the ROOT interpreter for execution. The C++ kernel does not currently make sure rootlogon.C is executed as the ROOT prompt does.
As a workaround, you can do from the first cell of your C++ notebook:
Thanks, this works. Is there maybe a way to hide even this command? For example, I know there are some ROOT settings in $ROOTSYS/etc that are automatically loaded. I actually don’t want users to write this line for every notebook that they create. I had hoped that ROOT notebooks somehow searches through the current working directory and some other standard directories to look for a rootlogon.C and load it (as you’d expect they would be loaded in the rootcling interactive shell).