In pyroot I found it’s quite useful to put a a = raw_input() after drawing a histogram to check the histogram before going further. I wonder if it’s possible in C++ macro?
I tried to use cin >> var in C++ macro like this:
{
auto h1 = new TH1F();
h1->Draw();
gPad->Draw();
string xx;
cin >> xx;
}
But the histogram was not drawn before the cin >> xx line…
Thanks a lot for the quick reply. This recipe does make the histogram show up. However, sometimes I want to do a bit more interactively, for example, zooming, set the axis to log scale, or even maybe do a fit, save the pad to a figure… These are doable in pyroot. Is it possible in C++ macro?
I understand your suggestion better now. I can do a lot of things interactively before left-clicking the axises, which will trigger the next step in the macro. Thanks a lot!