Re: Draw geometry on Canvas

Valery Fine (fine@bnl.gov)
Mon, 14 Sep 1998 09:52:03 -0500


You should convert the C++ subroutine g2root creates into the ROOT
macro, namely you are required to comment

void mygeom()

out.

Otherwise the all classes that subroutine creates have a local
scope and deleted just you leave it.

Hope this helps,
Valery

On 13 Sep 98 at 20:55, Jayoung Wu wrote:

> Date: Sun, 13 Sep 1998 20:55:44 -0400 (EDT)
> From: Jayoung Wu <jayoung@glue.umd.edu>
> Reply-to: Jayoung Wu <jayoung@glue.umd.edu>
> To: roottalk@hpsalo.cern.ch
> Subject: Draw geometry on Canvas

> p.s. Just for reference I attached "mygeom.C" here.
> =============================================================
> void mygeom()
> {
> //
> // This file has been generated automatically via the root
> // utility g2root from an interactive version of GEANT
> // (see ROOT class TGeometry header for an example of use)
> //
> TMaterial *mat;
> TMixture *mix;
> TRotMatrix *rot;
> TNode *Node, *Node1;
>
> TGeometry *mygeom = new TGeometry("mygeom","mygeom.C");


=================================================================
Dr. Valeri Faine (Fine)
------------------- Phone: +1 516 344 7806
Brookhaven National Laboratory FAX : +1 516 344 4206
Bldg. 510A /STAR mailto:fine@bnl.gov
Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine
USA

Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su