Hi Rene,
I'm sorry that my message was not clear enough.
Rene Brun wrote:
> > -Could you indicate what type of problems you faced? > -What is the problem that you are trying to solve?
Sometimes I want to have a look at intermediate results and then continue calculation. Adding the statement gPad->WaitPrimitive() to a script I expect to get pause at that point. The problem is that in some cases ROOT continues execution of the script. E.g. this script doesn't stop at all:
{
h = new TH1F ("h", "h", 10, 0, 1);
h->Draw();
t = new TText(0.5, 0.5, "Text");
t->Draw();
for (Int_t i = 0; i < 10; ++i)
{
h->Fill(i/10. + 0.01); c1->Modified(); c1->Update(); c1->WaitPrimitive();
Another case is more subtle. Let's remove TText object: {
h = new TH1F ("h", "h", 10, 0, 1);
h->Draw();
for (Int_t i = 0; i < 10; ++i)
{
h->Fill(i/10. + 0.01); c1->Modified(); c1->Update(); c1->WaitPrimitive();
Another issue that closing of the window during processing of WaitPrimitive() obviously leads to segmentation violation.
> What you show is certainly not a solution to any problem. > If you just want to interact with the window while filling the histograms > simply call gSystem->ProcessEvents();
No, the goal is to stop calculation until user presses a key. Fill() was added just to have different plots.
> On Mon, 24 Apr 2006, Maxim Nikulin wrote: >
>>
>>
>>
>>
-- Maxim Nikulin P.S. Rene, I beg you pardon that first time I sent this letter to you instead of roottalk.Received on Wed Apr 26 2006 - 18:42:08 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:58 MET