TGeoManager

Hello,

I am trying to draw collision of two nuclei in a 3D representation. I am trying to use TGeoManager and other “Geo” classes to accomplish that. When I take nucleus.C tutorial from the tutorials directory I find this:
it run only with root_v4.02.00. If I try to run this macro in 4.04.02 or new 5.02.00 it crashes with this error:

[code]root [1] .x nucleus.C
Geometry nucleus, Model of a nucleus created
Top volume is WORLD. Master volume is WORLD
List of materials :
Fixing runtime shapes…
— nothing to fix
Counting nodes…
Voxelizing…
Building caches for nodes and matrices…
— node ID tracking disabled

101 nodes/ 3 volume UID’s in Model of a nucleus

----------------modeler ready----------------
— Automatic visible depth disabled
Error in TPluginHandler::SetupCallEnv: method TGeoPainter not found in class TGeoPainter
Error in TGeoManager::GetGeomPainter: could not create painter

*** Break *** segmentation violation
Generating stack trace…
0x41c8b1b6 in TGeoVolume::Draw(char const*) + 0x52 from /cern/root/current/lib/libGeom.so
0x41cd413e in from /cern/root/current/lib/libGeom.so
0x4076d5f6 in G__call_cppfunc + 0x2db from /cern/root/current/lib/libCint.so
0x4075c21f in G__interpret_func + 0x7a3 from /cern/root/current/lib/libCint.so
0x4073cca1 in G__getfunction at func.c:0 from /cern/root/current/lib/libCint.so
0x407d6fb8 in G__getstructmem + 0x90f from /cern/root/current/lib/libCint.so
0x407ce4dd in G__getvariable at var.c:0 from /cern/root/current/lib/libCint.so
0x4073391a in G__getitem at expr.c:0 from /cern/root/current/lib/libCint.so
0x407322e0 in G__getexpr at expr.c:0 from /cern/root/current/lib/libCint.so
0x40785a7f in G__exec_function + 0x1df from /cern/root/current/lib/libCint.so
0x4078d1a9 in G__exec_statement at parse.c:0 from /cern/root/current/lib/libCint.so
0x4075da7a in G__interpret_func at ifunc.c:0 from /cern/root/current/lib/libCint.so
0x4073d333 in G__getfunction at func.c:0 from /cern/root/current/lib/libCint.so
0x40733946 in G__getitem at expr.c:0 from /cern/root/current/lib/libCint.so
0x407322e0 in G__getexpr at expr.c:0 from /cern/root/current/lib/libCint.so
0x407298aa in G__calc_internal at expr.c:0 from /cern/root/current/lib/libCint.so
0x40793142 in G__process_cmd + 0x20d6 from /cern/root/current/lib/libCint.so
0x401c1a3f in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) + 0xaf from /cern/root/current/lib/libCore.so
0x401c1b76 in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) + 0x46 from /cern/root/current/lib/libCore.so
0x4011601f in TApplication::ProcessFile(char const*, int*) + 0x6d3 from /cern/root/current/lib/libCore.so
0x401158d1 in TApplication::ProcessLine(char const*, bool, int*) + 0x5fb from /cern/root/current/lib/libCore.so
0x411d4f02 in TRint::HandleTermInput() + 0x1f8 from /cern/root/current/lib/libRint.so
0x411d3ba2 in TTermInputHandler::Notify() + 0x24 from /cern/root/current/lib/libRint.so
0x411d5a1e in TTermInputHandler::ReadNotify() + 0x12 from /cern/root/current/lib/libRint.so
0x4025c69a in TUnixSystem::CheckDescriptors() + 0x152 from /cern/root/current/lib/libCore.so
0x4025b5ab in TUnixSystem::DispatchOneEvent(bool) + 0x17d from /cern/root/current/lib/libCore.so
0x40182890 in TSystem::InnerLoop() + 0x18 from /cern/root/current/lib/libCore.so
0x4018282f in TSystem::Run() + 0x7b from /cern/root/current/lib/libCore.so
0x4011614e in TApplication::Run(bool) + 0x32 from /cern/root/current/lib/libCore.so
0x411d49b7 in TRint::Run(bool) + 0x3e5 from /cern/root/current/lib/libRint.so
0x08048e1d in main + 0x71 from /cern/root/current/bin/root.exe
0x4131fe80 in __libc_start_main + 0xd0 from /lib/tls/libc.so.6
0x08048d11 in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x3d from /cern/root/current/bin/root.exe
Root > Function nucleus() busy flag cleared
[/code]

I don’t know where the problem could be. Do I need to compile these versions differently? I am in particular interested in using the newest version because that should allow me to save the 3D drawing as eps or pdf (according to Rene Brun’s post)

thanks
michal

I do not see any problem with the tutorial nucleus.C.
You seem to have something wrong with your installation.
Did you import the binary tar balls from the ROOT web site or did you
install from source yourself?
If you installed from source yourself, did you follow the procedure
indicated at
http://root.cern.ch/root/Install.html

gmake gmake cintdlls gmake map

Note that we are currently working on the GL viewer to show
dynamic particles in time

Rene

I am still having the same problem when running nucleus.C tutorial. I downloaded source for root_v5.02 from: root.cern.ch website. I compiled it using:

./configure linux
gmake
gmake cintdlls
gmake maps

and still getting the same error message when I try to draw it. command causing the error is:
top->Draw(“ogl”);
It doesn’t really matter if I draw it to OpenGL or to canvas. Still the same error message… There must be something wrong with my compilation/installation but I cannot figure it out!
The most puzzling part is that I do the same for version 4.02 (concerning compilation/installation) and I can draw it, but the problem is I cannot save it to a eps, pdf file…like in the new 5.02 version.

michal

Could you send me the output of the 4 following commands
./configure linux

ls -l $ROOTSYS/lib

nm $ROOTSYS/lib/libGeomPainter.so |grep TGeoPainter

g++ -v

Rene

Hi Rene,

thanks a lot for your help, I am kind of cueless right now what is wrong with my installation of root on my system. I know I must be doing something wrong but I can’t figure out what it is…I added all listings you asked for in the attachment.

thanks for the help
michal
listing.tar (20 KB)

All your files look correct.
Could you check your file $ROOTSYS/etc/system.rootrc? Did you make
changes in this file? or do you have a .rootrc file?
In system.rootrc, do you have the line:
Plugin.TVirtualGeoPainter: * TGeoPainter GeomPainter “TGeoPainter(TGeoManager*)”

Rene

Thanks a lot Rene,

I was missing the Plugin.TVirtual… line in my .rootrc file. It was outdated because I am still using the same .rootrc file since version 3.10… It was my problem!

thanks again
michal