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.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/persistency/P02/README (Version 11.3.0) and /examples/extended/persistency/P02/README (Version 9.5.p2)


  1                                                     1 
  2      =========================================      2      =========================================================
  3      Geant4 - an Object-Oriented Toolkit for S      3      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
  4      =========================================      4      =========================================================
  5                                                     5 
  6                             ExampleP02              6                             ExampleP02
  7                             ----------              7                             ----------
  8                                                     8 
  9 General description                            <<   9   General description
 10 -------------------                            <<  10   -------------------
 11                                                    11 
 12 This example shows how to store in a binary fi <<  12   This example shows how to store in a binary file and how to
 13 read back the geometry tree using the 'reflect     13 read back the geometry tree using the 'reflection' technique for
 14 persistency provided by the Reflex tool also i     14 persistency provided by the Reflex tool also included in ROOT. The
 15 Reflex tool allows to create a dictionary for      15 Reflex tool allows to create a dictionary for the geometry classes,
 16 making then possible to save the entire tree i     16 making then possible to save the entire tree in a .root file.  
 17                                                    17 
 18 The provided makefile produces the executable:     18 The provided makefile produces the executable: 'exampleP02'. In order
 19 to run it one has to specify the argument, eit     19 to run it one has to specify the argument, either 'write' or
 20 'read'. In the first case the geometry is inst     20 'read'. In the first case the geometry is instaciated in the standard
 21 way and then saved into the root file (geo.roo     21 way and then saved into the root file (geo.root). In the second case,
 22 the geometry is read from geo.root file.           22 the geometry is read from geo.root file.
 23                                                    23 
 24                                                    24 
 25 Building and running the example               <<  25   Building and running the example
 26 --------------------------------               <<  26   --------------------------------
 27                                                    27 
 28 This examples requires the ROOT toolkit of ver <<  28   Before buidling and/or running the example you need to set the
 29 provided CMake file checks for the existence o <<  29 following environment variables:
 30 Once the CMake configuration has been succesfu <<  30 
 31 for this example should be built using make    <<  31 ROOTSYS - ROOT installation directory, it is required to run ROOT
 32 (in your CMake build directory):               <<  32 
 33                                                <<  33 GCCXMLPATH - gccxml binary directory, it is needed by ROOT for the
 34   make                                         <<  34              dictionary generation
 35                                                <<  35 LD_LIBRARY_PATH - to include the ROOT library path and the path to
 36 Remark on dictionary generation                <<  36                   the dictionary library, i.e., for tcsh UNIX shell:
 37 -------------------------------                <<  37    setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:$ROOTSYS/lib:
 38                                                <<  38                           $G4WORKDIR/tmp/$G4SYSTEM/exampleP01
 39 The dictionary is generated by ${ROOTSYS}/bin/ <<  39 
 40 tool. The arguments that will be used by this  <<  40 The present version of the example requires that Geant4 headers are
 41 in CMakeLists.txt using the CMake function REF <<  41 installed in a single directory referenced by G4INCLUDE, as the standard
 42 provided by ROOT. They include the header file <<  42 Geant4 installation procedure allows to do.
 43 all the classes we want to generate the dictio <<  43 
 44 a so called selection file (xml). The role of  <<  44 Once those variables are set (together with the standard Geant4 setup)
                                                   >>  45 the example can be build by issueing the 'make' command. The final
                                                   >>  46 executable file can be found in the usual directory:
                                                   >>  47 
                                                   >>  48 $G4WORKDIR/bin/$G4SYSTEM/
                                                   >>  49 
                                                   >>  50 
                                                   >>  51   Remark on dictionary generation
                                                   >>  52   -------------------------------
                                                   >>  53 
                                                   >>  54   The dictionary is generated by ${ROOTSYS}/bin/genreflex
                                                   >>  55 tool. The header file including headers for all the classes we want to
                                                   >>  56 generate the dictionary for should be given as argument. Additionally,
                                                   >>  57 a so called selection file (xml) should be provided (with -s flag) to
                                                   >>  58 the genreflex tool (see the GNUmakefile). The role of this file is to
 45 specify which classes we want to generate the      59 specify which classes we want to generate the dictionary for. The
 46 selection file for our dictionary is in xml/ d     60 selection file for our dictionary is in xml/ directory. Please refer
 47 to genreflex manual for more details concernin     61 to genreflex manual for more details concerning the usage of that
 48 tool.                                              62 tool.  
 49                                                    63 
 50 Concerning generating dictionary for the Geant     64 Concerning generating dictionary for the Geant4 objects, there are
 51 also two technical remarks that need to be mad <<  65 also two technical remarks that need to be made here. The gccxml tool
 52 The Reflex tool requires all the templated cla <<  66 (version 0.6.0_patch1) requires all the templated classes to be
 53 explicitely used somewhere in the included hea     67 explicitely used somewhere in the included header files in order for
 54 the generation of the dictionary to be possibl     68 the generation of the dictionary to be possible. For those templated
 55 classes for which it is not the case, the prob     69 classes for which it is not the case, the problem can be very easily
 56 solved by instaciating them in the headerfile      70 solved by instaciating them in the headerfile which is given to
 57 genreflex (see includes/ExP02Classes.hh) as ar <<  71 genreflex (see includes/Classes.h) as argument.  
 58 The second remark is that there is an unfortun     72 The second remark is that there is an unfortunate clash of names as
 59 far as G4String class is concerned. The header     73 far as G4String class is concerned. The header of G4String class
 60 defines __G4String which happens to be the nam     74 defines __G4String which happens to be the name of a variable used
 61 within the generated dictionary code. The solu     75 within the generated dictionary code. The solution for that is to do
 62 #undef __G4String in include/ExP02Classes.hh f <<  76 #undef __G4String in include/Classes.h file.
                                                   >>  77 
                                                   >>  78