Running TBrowser by the shell script

I am running a file in a batch mode with following commands. It is running fine till root -b, but not opening TBrowser window. How can I do this?

g++ -o dihadroncorr dihadroncorr.cxx ampt.cxx $(root-config --libs) $(root-config --cflags)
root -b
TBrowser h

Thank you

Batch mode means that windows won’t open.
Don’t use batch modd if you need a TBrowser :slight_smile:

As we do to open TBrowser

root[0] > TBrowser b

I wanted to the same in bash scipt.

create a macro named “browser.C” containing this:

TBrowser *browser() { return new TBrowser; }

And then call root -l browser.C

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.