Hi!
This is my first post, I hope to be in the right place for my problem.
At this moment I’m working with ROOT 5.24 with Visual C++ 2008 on Windows XP professional SP2.
I need to draw three cylindrical layers, coaxial, for a (very!) simplified simulation of a collider experiment.
I included the following geometry classes in the main macro:
#include <TSystem.h>
#include <TGeoManager.h>
#include <TGeoMaterial.h>
#include <TGeoMedium.h>
#include <TGeoVolume.h>
#include <TGeoTube.h>
#include <TGeoCompositeShape.h>
and the portion of code in which I draw these three layers is:
gSystem->Load("libGeom");
new TGeoManager("setup","layers");
TGeoMaterial *mat = new TGeoMaterial("vacuum",0.,0.,0.);
TGeoMedium *med = new TGeoMedium("vacuum",1,mat);
TGeoVolume *top = gGeoManager->MakeBox("top",med,100.,100.,100.);
gGeoManager->SetTopVolume(top);
TGeoTube *tube0 = new TGeoTube("tube0",r0, r0 + beryllium->GetThickness(),100.);
TGeoTube *tube1 = new TGeoTube("tube1",r1, r1+layer1->GetThickness(),70.);
TGeoTube *tube2 = new TGeoTube("tube2",r2, r2+layer2->GetThickness(),50.);
TGeoCompositeShape *cs = new TGeoCompositeShape("cs","tube0+tube1+tube2");
TGeoVolume *comp = new TGeoVolume("comp",cs);
top->AddNode(comp,1);
gGeoManager->CloseGeometry();
// gGeoManager->SetTopVisible();
TCanvas *cvs2 = new TCanvas("cvs2","A simple 3D view of layers");
cvs2 -> cd();
top->Draw("ogl"); // options: "pad" , "x3d", "ogl"
where beryllium, layer1 and layer2 are objects of other my custom classes.
All macros are compiled fine in Linux (Ubuntu 9.04 with ROOT 5.18); and also here in Windows XP,
but with the simple “pad” option. But If I put in Windows the “x3d” option I have the following error:
Error in TWinNTSystem::DynamicPathName: X3d does not exist in (… my PATH … )
or has wrong file extension (.dll)
Warnig in TCanvas::TPad::CreateViewer3D: Cannot create 3D viewer of type: x3d
With the “ogl” option I get instead:
ROOT application has encountered a problem and
needs to close. We are sorry for the inconvenience.
To see what data this error report contains, click here.
and by clicking on the link I read:
Error signature:
AppName: root.exe AppVer: 5.24.0.1 ModName: msvcr90.dll
ModVer: 9.0.30729.1 Offset: 0006c955
and a long list of info and errors.
The opengl32.dll library is correctly in C:\WINDOWS\system32.
If I run from tutorials a macro of the “geom” folder, for instance
C:\root\tutorials\geom\geodemo.C
and I try to view a shape with the x3d or the ogl options I get the same errors.
These are my personal environment variables (I usually work in XP with a limited account, not
as Admin), set with persistence from:
Control Panel > System > Advanced > Environment Variables
INCLUDE:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
C:\Program Files\Microsoft Visual Studio 9.0\VC\include
LD_LIBRARY_PATH:
C:\root\lib
LIB:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
C:\Program Files\Microsoft Visual Studio 9.0\VC\lib
PATH:
C:\Program Files\Notepad++
C:\root\bin
C:\Program Files\Python32
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
ROOTSYS:
C:\root
TEMP:
%USERPROFILE%\Local Settings\Temp
TMP:
%USERPROFILE%\Local Settings\Temp
I compile my code in a custom sub-directory C:\root\development to avoid problems with blanks.
Where am I wrong? I don’t understand if there’s a problem with ROOT or if the problem is in XP,
perhaps I need to install some missing components.
Thanks a lot…
luca