Dear all,
this little snippet of code works when executed like
root run.C
run.C:
{
cout << “blabla” << endl;
TCanvas* c123 = new TCanvas(“c123”,“c123”,1600,800);
c123->cd();
TGraph* gr = new TGraph(2);
gr->SetPoint(0,1,1);
gr->SetPoint(1,2,2);
gr->Draw(“apl”);
gPad->Update();
}
Them, I was trying to run it in batch mode via a python script:
script.py:
import os
print “start script”
bashCommand = “root.exe -b run.C”
os.system(bashCommand)
but now, the Canvas is not dislplayed.
I searched hence through the forum and found tipps like adding
gROOT->SetBatch(kTRUE);
gSystem->SetDisplay();
and these sort of things, but it doesnt work.
What am I doing wrong?
Thanks!