Hello,
What is the right way to update TGraph object?
I have an external libraray call from ROOT. The code looks like
THandler : public TLibEventHandler {
public:
int m_np;
TGraph *m_g;
TCanvas *m_c;
void OnEvent(int somedata) {
m_gr->SetPoint(m_np, m_np, somedata);
m_np++;
m_c->Update();
}
}
TLibObject *o = new TLibObject();
THandler *h = new THandler();
o->SetHandler(h);
h->m_c = new TCanvas(“c1”,“A Simple Graph”,200,10,700,500);
h->m_g = new TGraph(1);
h->m_g->Draw(“L”);
o->Process(); //infinite loop inside
If Process call never ends du to infinite loop inside, the graph is not updated. Actually the graph is feezed.
So, is there any other then Update() way to update TGraph object?
Thanks in advance!
Regards,
Ilya