Wednesday, February 1, 2012

ROOT to perform a shell command in a macro

You can make a ROOT macro execute another root macro or a shell command using the following line:

gROOT->ProcessLine("!shell_command");
or
gROOT->ProcceLine("ThisRootMacro()");

Don't forget that the macro needs to be uploaded first:
gROOT->LoadMaco(ThisRootMacro.C);

No comments: