Warning, /geant4/examples/extended/persistency/gdml/G01/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleG01 Example G01
0002
0003 ## GDML READ/WRITE
0004
0005 This example demonstrates the usage of the GDML reader and writer. It allows
0006 to export geometry descriptions in an application independent format (GDML,
0007 Geometry Description Markup Language).
0008 The GDML files can be then used to interchange geometries between different
0009 applications and users.
0010
0011 The detector construction consists of a call to GDMLProcessor which parses a
0012 GDML file and returns the pointer to the world volume. The user can also write
0013 her/his own GDML file and use it as the primary input format for her/his Geant4
0014 application.
0015
0016 Several simple GDML files are provided:
0017 - axes.gdml, showing loading and orientation of Cartesian axes;
0018 - solids.gdml, list of all supported solids with placement;
0019 - scale.gdml, a simple diamond structure made of extruded solids;
0020 - divisionvol.gdml, a divided box;
0021 - parameterized.gdml, a parameterised box;
0022 - pTube.gdml, a parameterised tube;
0023 - auxiliary.gdml, showing association of volume with auxiliary information;
0024 - etc...
0025
0026 ## HOW TO BUILD THE EXAMPLE ?
0027
0028 - You need to have built the persistency/gdml module by having
0029 set the `-DGEANT4_USE_GDML=ON` flag during the CMAKE configuration step,
0030 as well as the `-DXERCESC_ROOT_DIR=path_to_xercesc` flag pointing to
0031 the path where the XercesC XML parser package is installed in your system.
0032
0033 - Compile and link to generate the executable (in your CMAKE build directory):
0034 ```
0035 make
0036 ```
0037
0038
0039 - Execute the application.
0040 - For reading and visualize interactively a GDML file:
0041 ```
0042 ./load_gdml [GDML-file-in].gdml
0043 ```
0044
0045 - For reading, writing and visualize interactively a GDML file:
0046 ```
0047 ./load_gdml [GDML-file-in].gdml [GDML-file-out].gdml
0048 ```
0049
0050 - For reading, writing a GDML file and running in batch a macro:
0051 ```
0052 ./load_gdml [GDML-file-in].gdml [GDML-file-out].gdml [macro].in
0053 ```