Warning, /geant4/examples/extended/persistency/gdml/G02/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleG02 Example G02
0002
0003
0004 ## EXAMPLE OF USE GDML READER/WRITER IN DETECTOR CONSTRUCTION
0005
0006 In this directory you can find a example showing how to use GDML module for
0007 reading and writing. It is also shown how to Read STEP Tools files.
0008 In this example the DetectorConstruction consists of a Simple Detector, then
0009 this Detector is filled/written in GDML.
0010 The different options for writing and reading GDML files are shown in the
0011 Detector Construction: writing modular files, using different schema location,
0012 setting parameters for names in GDML file, etc.
0013 For more information, please, refer to the GDML Documentation.
0014
0015 The Geometry is a Simple Detector Box with 4 Subdetectors.
0016 This setup shows how to use Reflection Factory, Assembly of Volumes and
0017 Parameterisation.
0018 Using commands or macros it possible to read or write GDML file.
0019
0020 ## HOW TO BUILD THE EXAMPLE ?
0021
0022
0023 - You need to have built the persistency/gdml module by having
0024 set the `-DGEANT4_USE_GDML=ON` flag during the CMAKE configuration step,
0025 as well as the `-DXERCESC_ROOT_DIR=path_to_xercesc` flag pointing to
0026 the path where the XercesC XML parser package is installed in your system.
0027
0028 - Compile and link to generate the executable (in your CMAKE build directory):
0029 ```
0030 % make
0031 ```
0032
0033 - Execute the application:
0034 ```
0035 % ./geotest [macro-file].mac
0036 ```
0037
0038 You can run this application with the following macro file:
0039
0040 - write_gdml.mac : This macro will write the Geometry defined in file
0041 "test.gdml" and output to a new file wtest.gdml
0042 To change this name you can use command :
0043 /mydet/writeFile FileName.gdml
0044
0045 - read_gdml.mac : This macro will read the Geometry from file "test.gdml"
0046 To change this name you can use command :
0047 /mydet/readFile FileName.gdml
0048
0049 - read_step.mac : This macro will read the STEP Tool files "mbb.geom" and
0050 "mbb.tree" and load them in memory.
0051 To change this name you can use command :
0052 /mydet/StepFile FileName