55 lines
2.3 KiB
Plaintext
55 lines
2.3 KiB
Plaintext
$Id: README,v 1.8 2006/06/19 09:48:18 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 Geant4 extensions and 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.
|
|
|
|
- Customise the 'test.gdml' schema file, specifying in the top line the
|
|
right path where to retrieve the main GDML schema file (step that will
|
|
become automatic in future).
|
|
|
|
- Compile and link to generate an executable:
|
|
% gmake
|
|
Note: 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.
|
|
|
|
- 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).
|
|
|