Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/persistency/gdml/G03/README.md is written in an unsupported language. File is not indexed.

0001 \page ExampleG03 Example G03
0002 
0003 ## EXAMPLE OF DEFINITION OF A GDML EXTENSION WITH ASSOCIATED READER AND WRITER
0004  
0005 
0006  In this directory you can find an example showing how to extend the GDML
0007  schema and plug-in a custom reader and writer to the system for handling
0008  the extension.
0009  For more information, please, refer to the GDML Documentation.
0010   
0011  The Geometry is a Simple Box to which it is assigned a color as
0012  visualization attribute.
0013  The entity "color" is defined as part of the "extension" tag and properly
0014  implemented in the GDML schema extension placed inside the directory
0015  SimpleExtensionSchema.
0016  The GDML file implenting the geometry with colors extension is
0017  color_extension.gdml, in which the standard "gdml" tag has been replaced
0018  by the "gdml_simple_extension" tag, with relative location for the new schema.
0019  The GDML file is automatically loaded by the program.
0020  It is also possible to use UI commands or macros as arguments to read any
0021  standard GDML file.
0022   
0023 ## HOW TO BUILD THE EXAMPLE ?
0024  
0025 - You need to have built the persistency/gdml module by having
0026   set the `-DGEANT4_USE_GDML=ON` flag during the CMAKE configuration step, 
0027   as well as the `-DXERCESC_ROOT_DIR=path_to_xercesc` flag pointing to 
0028   the path where the XercesC XML parser package is installed in your system.
0029  
0030  - Compile and link to generate the executable (in your CMAKE build directory):
0031 ```
0032 % make
0033 ```
0034  
0035  - Execute the application for reading and visualizing the setup:
0036 ```
0037 % ./gdml_ext read_ext.mac
0038 ```
0039 
0040  - Execute the application for also writing the setup:
0041 ```
0042 % ./gdml_ext [write_ext.mac]
0043 ```