Loading a macro via a shell script

Hello!

What’s the linux shell command to load a macro (the equivalent of .L and not .x)

i.e.; the equivalent of
root [0] .x Var.C++
is
Shell$]root ‘Var.C++()’

Simillarly, what’s the equivalent of
root [0] .L Var.C++

I ask because I want to write a script that first loads a macro and then executes another macro.

So I want to put the following into a line on a script:
root [0] .L Var.C++
root [1] .x test.C++

and if it weren’t for the first .L file I could’ve done something like
system "root -b -q ‘test.C()’ "; //in my perl script.

Thank you!

  • Sujeewa

use gROOT->ProcessLine(cint_command), eg
gROOT->ProcessLine(".L mymacro.C+");

see: ftp://root.cern.ch/root/doc/7CINT.pdf

Rene