Files
geant4/examples/extended/gdml
2016-06-09 14:55:03 +02:00
..
2016-06-09 14:55:03 +02:00
2016-06-09 14:55:03 +02:00
2016-06-09 14:55:03 +02:00
2016-06-09 14:55:03 +02:00
2016-06-09 14:55:03 +02:00
2016-06-09 14:55:03 +02:00
2016-06-09 11:11:55 +02:00

$Id: README,v 1.9 2006/07/24 15:32:13 witoldp Exp $
-------------------------------------------------------------------

     =========================================================
     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
     =========================================================

                          GDML read/write
                          ---------------

This example demonstrates the usage of the GDML reader and writer. It allows
to export geometry descriptions in an application independent format (GDML,
Geometry Description Markup Language).
The GDML files can be then used to interchange geometries between different
applications and users.

The detector construction consists of a call to GDMLProcessor which parses the
GDML file (test.gdml) and returns the pointer to the world volume. The user
can also write his/her own GDML file and use it as the primary input format for
his/her Geant4 application.

Once the Geant4 geometry is loaded in the memory, the G4GDMLWriter class is
instantiated (in the 'main') to demonstrate the exporting of the GDML file.
The call to DumpGeometryInfo method causes the GDML writer to scan the Geant4
geometry tree and write it out in the form of a GDML file.

HOW TO BUILD THE EXAMPLE ?

- Install the GDML package with the Geant4 binding as well as Xerces.
  See: http://cern.ch/gdml.

- Set the environment variable GDML_INC to point to the directory where
  GDML includes are installed and GDML_LIB to point to the directory
  where GDML libraries are installed. 
  Set XERCESCROOT to point to place where Xerces is installed.
  You can also edit the GNUmakefile provided with the example and
  customise it for your specific setup.

- Compile and link to generate an executable:
 	      % gmake
  Note 1: GDML requires that all the Geant4 header files are copied to
  one directory. You can use the Geant4 Configure script for coping 
  the Geant4 header files.
  Note 2: new version of GDML (after GDML_2_5_0) have one additional
  library called G4Evaluator. If you are compiling with older version
  of GDML, you should remove that library from the makefile.

- You may need to customise the location of the GDML schema file which is 
  specified at the top of test.gdml file (the geometry file). By default 
  the schema will be loaded from the web server of LCG release area, however,
  you can load your own copy of the schema by specifying the path, like:
  xsi:noNamespaceSchemaLocation="/home/me/MYGDML/src/GDMLSchema/gdml.xsd"
 		
- Execute the application:
 	      % g4_gdml_read_write
  Note: if you are using dynamic libraries, you should add $GDML_LIB
  and $XERCESCROOT/lib paths to the LD_LIBRARY_PATH directory (or
  equivalent on your system).