12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Visualizationuse G4VisExecutive, a provided class with included implementation. G4VisExecutive is sensitive to theG4VIS_USE... variables mentioned below.If you do wish to write your own subclass, you may do so. You will see how to do this by looking atG4VisExecutive.icc. A typical extract is:...RegisterGraphicsSystem (new G4DAWNFILE);...#ifdef G4VIS_USE_OPENGLXRegisterGraphicsSystem (new G4OpenGLImmediateX);RegisterGraphicsSystem (new G4OpenGLStoredX);#endif...If you wish to use G4VisExecutive but register an additional graphics system, XXX say, you may do so eitherbe<strong>for</strong>e or after initializing:visManager->RegisterGraphicsSytem(new XXX);visManager->Initialize();By default, you get the DAWNFILE, HepRepFile, RayTracer, VRML1FILE, VRML2FILE, ATree and GAGTreedrivers. Additionally, you may choose from the OpenGL-Xlib, OpenGL-Motif, Qt, OpenInventor, RayTracerX,DAWN-Network and VRML-Network drivers, each of which can be selected by setting the proper environmentvariable:setenv G4VIS_USE_OPENGLX 1setenv G4VIS_USE_OPENGLXM 1setenv G4VIS_USE_OPENGLQT 1setenv G4VIS_USE_OIX 1setenv G4VIS_USE_RAYTRACERX 1setenv G4VIS_USE_DAWN 1setenv G4VIS_USE_VRML 1(Of course, this has to be chosen from the set incorporated into the <strong>Geant4</strong> libraries during their compilation.)Unless the environment variable G4VIS_NONE is set, these set C-pre-processor flags of the same name.Also, unless the environment variable G4VIS_NONE is set, the C-pre-processor flag G4VIS_USE is always setby default. This flag is available in describing the main() function.You may have to set additional environment variables <strong>for</strong> your selected visualization drivers and graphics systems.For example, the OpenGL driver may require the setting of OGLHOME which points to the location of the OpenGLlibraries. For more details, see Section 8.3 "Visualization Drivers" and pages linked from there.8.2.3. A Sample Set-up FileThe following can be part of the user's .cshrc or .tcshrc file on a Linux plat<strong>for</strong>m to configure the environment<strong>for</strong> creating <strong>Geant4</strong> executables available <strong>for</strong> <strong>Geant4</strong> visualization. This sample is shown only as an example; itmay NOT correspond to a specific plat<strong>for</strong>m configuration and does NOT apply in general <strong>for</strong> any specific setup !218

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!