wait(){ h = new TH1F ("h", "h", 10, 0, 1); h->Draw(); for (Int_t i = 0; i < 10; ++i) { h->Fill(i/10.); c1->Modified(); c1->Update(); c1->WaitPrimitive(); cout << i << endl; } }