Hello
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?
!/bin/bash
g++ -o dihadroncorr dihadroncorr.cxx ampt.cxx $(root-config --libs) $(root-config --cflags)
./dihadroncorr
root -b
TBrowser h
Thank you
Hi,
Batch mode means that windows won’t open.
Don’t use batch modd if you need a TBrowser
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
A brutal fix …
echo 'gROOT->LoadMacro("macro.C"); macro m; m.Loop(); gSystem->Exit(0);' | root -b -l
… or …
root -b -l <<EOF
.L macro.C
macro m;
m.Loop();
.q
EOF
Actually, you have three possibilities:
root -l -b -q DrawDiLepPlots.C(3)
root -l -b -q DrawDiLepPlots.C\ (\ 3\ )
root -l -b -q "DrawDiLepPlots.C(3)"
root -l -b -q “DrawDiLepPlots.C ( 3 )”
root -l -b -q 'DrawDiLepPlots.C(3)'
root -l -b -q ‘DrawDiLepPlots.C ( 3 )’
Added: See, for example, ROOT User’s Guide -> Getting Started -> Start and Quit a ROOT Session
system
closed
August 3, 2017, 7:45am
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.