Hi ROOT Experts,
While writing a simple ROOT macro, I’ve noticed that I’m unable to display a canvas while I’m waiting for user input to a cin. A simple example is below (Save as Example.C and run as “root.exe Example.C”).
You’ll see that I am making a simple plot. When my macro pauses to get user input to a cin however, the canvas is unable to display.
Are there any ideas to work around this?
Thanks in advance,
TH1F *h1 = new TH1F(“h1”, “h1 title”, 4, 0, 4);
bool WhileBool = 1;
cout<<"Enter 0 to exit the macro. Enter 0 to stay in while loop: "<<endl; cin>>WhileBool;