Re:

From: Maarten Bruinsma (t26@hp.nikhef.nl)
Date: Wed Mar 19 1997 - 13:34:52 MET


*************************************************************************
*                         Maarten Bruinsma                              *
*                     -----------------------                           *
*           Werk:                            Prive:                     *
*       NIKHEF/ HERA B                   Ruysdaelkade 189 HS            *
*       Kruislaan 409                    1072 AV AMSTERDAM              *
*       Postbus 41882                    tel. (020) 6758856             *
*       1009 DB AMSTERDAM                                               *
*       tel. (020) 5922116               email: t26@nikhef.nl           *
*       fax. (020) 5995155               http://www.nikhef.nl/user/t26/ *
*************************************************************************
Hi Fons,

I have replaced the whole routine by the single statement

void Track::Plot_On_Screen(CellInfo this_cel[NUMBER_OF_PLANES][NUMBER_OF_WIRES]) 
{
TApplication theApp("Toep", 0, 0);
}

and I still get those errors. What should the parameters argc and argv be?

Ciao,

Maarten

 


On Wed, 19 Mar 1997, Fons Rademakers wrote:

> Hi Maarten,
> 
>  in your case just use:
>      TApplication theApp("Toep", 0, 0);
> 
> However, better do this once and for all in the main() program. Also
> never call
> delete on an object (delete &theApp). The object will be destructed
> automatically
> when leaving the routine.
> 
> Cheers, Fons.
> 
> 
> Maarten Bruinsma wrote:
> > 
> > Thanks (dank je wel) for your very quick reply. What you mentioned could
> > very well be the problem. I have created dummies for the command line
> > argument, as I haven't got a clue what to put ther below you will
> > find the routine in which I invoke the ROOT stuff
> > 
> > void Track::Plot_On_Screen(CellInfo
> > this_cel[NUMBER_OF_PLANES][NUMBER_OF_WIRES]) /* plot circles and line */
> > {
> >   int a=0;
> >   char** p;
> >   TLine *this_line;
> >   TApplication theApp("Toep", &a, p);
> >   TCanvas *c = new TCanvas("Picture", "The Alignment Geometry", 400, 400);
> >   c->Show();
> >   TEllipse* these_ellipses = new TEllipse[nr_of_hits];
> >   for(a=0;a<nr_of_hits;a++)
> >     {
> >       these_ellipses[a]= TEllipse(hit[a].Z(), hit[a].Y(), hit[a].R(),
> > hit[a].Error_R());
> >       these_ellipses[a].Draw();
> >     }
> >   this_line = new
> > TLine(Z_0,0,this_cel[8][7].Z(),(this_cel[8][7].Z()-Z_0)*tan(1.570796-phi));
> > /* max z zit bovenste mod. */
> >   this_line->Draw(); /* nog herschalen */
> >   c->Update();
> >   getchar();
> >   theApp.SetReturnFromRun();
> >   theApp.Run();
> >   delete &theApp;
> > }
> > 
> > the purpose is to plot a track on screen and apart from mentioned error
> > will still need debugging probably.
> > 
> > Thanks again and in advance.
> > 
> > *************************************************************************
> > *                         Maarten Bruinsma                              *
> > *                     -----------------------                           *
> > *           Werk:                            Prive:                     *
> > *       NIKHEF/ HERA B                   Ruysdaelkade 189 HS            *
> > *       Kruislaan 409                    1072 AV AMSTERDAM              *
> > *       Postbus 41882                    tel. (020) 6758856             *
> > *       1009 DB AMSTERDAM                                               *
> > *       tel. (020) 5922116               email: t26@nikhef.nl           *
> > *       fax. (020) 5995155               http://www.nikhef.nl/user/t26/ *
> > *************************************************************************
> 
> -- 
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
> E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7822601
> 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:18 MET