root-framework

Execute root commands to link before starting execution


Is there a way to tell root to execute (say) the following commands at the start?

.L /usr/lib/libgsl.so
.L /usr/lib/libgslcblas.so

I find it convenient as I have to execute this every time I start root. My .C file has uses these libraries.

I found an option -e but I cannot use it for more than one line of commands.


Solution

  • Sure, just add the following into a ~/.rootlogon.C (or create one in case you don't have it):

    {
    // old content here
      gROOT->ProcessLine(".L /usr/lib/libgsl.so");
      gROOT->ProcessLine(".L /usr/lib/libgslcblas.so");
    }