How am I able to force a repaint of a canvas, pad or view inside of a
routine. My experience is that ROOT doesn't actually update these until
CInt has free time. Here is an example of TEST, a code segment which
demonstrates my problem.
William Deninger
Deninger@uiuc.edu
// TEST ROUTINE
{
// make canvas
TCanvas *c1 = new TCanvas("c1","Positron tracks");
c1->cd();
// create TGeometry and builds nodes, etc..
Geometry *geom = new Geometry("g2trace","g2trace"); // builds TGeometry
called g2trace
// Prepare data tape and data reconstruction class
BOOK b;
b.Unidaq("1125.tap");
// track level class. Contains straw chamber info and track reconstruction
HIT *hit;
//________________________________________________
geom->Draw(); // this doens't draw until TEST is finished!? // !
c1->Draw(); // What is the appropriate way of accomplishing this?
//________________________________________________
// begining data anlysis loop
//
// retrieve record
while(hit = b.get_event())
{
printf("Calculating next track\n");
hit->Minuit(); // minimize chi2 for track
TPolyLine3D *poly = new TPolyLine3D(900, hit->xpos, hit->ypos,
hit->zpos);
//________________________________________________
poly->Draw(); // again, this isn't drawn until TEST finishes // !
c1->Draw(); // What is the appropriate way of accomplishing this?
//________________________________________________
}
}