Instruction to create an executable of a HADES Geant version
by Ilse Koenig, October 10, 1997
last update April 14, 1998
Working on dslep01 at GSI
As long as you work on dslep01 at GSI, there are two possibilities:
You use the executable hadgeo on the account
/u/hades/hadsim/ggeo.
This program creates only the geometry and hit definition in Geant without creating
ntuples.
On the same directory you can find an initialization file
geaini.dat with
all geometry definitions which are presently defined and also the corresponding
input files.
A description of the
geometry including some pictures is in progress.
You can run this program also from your own account with your own initialization
file.
For this purpose your profile must contain the lines:
LD_LIBRARY_PATH=/usr/gnu/lib
export MAIL PATH LD_LIBRARY_PATH PS1 PS2 PATH
You work with the
HADES-CVS (code management system).
The code for the HADES Geant package is packed in different modules:
geant
contains the code to initialize and run Geant
grich
contains all code specific for the Rich
gmdc
contains all code specific for the Mdc
gtof
contains all code specific for the Tof
gshow
contains all code specific for the Shower
adm
contains makefiles which are included in the makefiles in the different modules
ggeo
contains all code to read the geometry and hit definitions and to
create it in Geant
ora
contains all code to connect the Oracle database
gora
contains all code to read the geometry from the database and to update the
database from file (executable geooraupdate)
util
contains helper classes, e.g. the string class and the container classes .
Each module has its own makefile and library. Users with access permission to
a special module may check this module out, modify it and create their own executable
hgeant using the module makefile. The geometry package is linked to
this executable.
Working on other platforms
To create executables on other platforms is more envolved. You cannot use
the existing libraries, but have to copy, to compile and to link the code using
the gnu compiler g++. Eventually the makefiles have to be modified.
Proceed in this order:
Suppose your home address on your platform is
/u/haduser
Copy the file /usr/local/bin/cvslogin
and modify it:
Set the environment variable HALO to
/u/haduser.
This file must be executed in your profile: . cvslogin new
Create the directories:
/u/haduser/packages/util/new
/u/haduser/packages/geant/new
/u/haduser/packages/ggeo/new
/u/haduser/packages/grich/new
/u/haduser/packages/gmdc/new
/u/haduser/packages/gtof/new
/u/haduser/packages/gshow/new
Copy to these directories all source files (*.F, *.inc, *.h, *.cc) and the
makefiles from the corresponding directories
/u/halo/packages/"module"/new
on dslep01 at GSI.
Create the directory /u/haduser/new/adm
and copy the files *.mk from the directory
/u/halo/new/adm.
These makefiles are
included in the module makefiles and create the dependency files *.d, compile
the code and create the libraries the executable depends on.
Create the directory
/u/haduser/new/inc
Copy the script "linkinclude" from
/u/halo/new/inc.
Run linkinclude. This will set links to all include
files in the different directories.
Create the library in each directory using the makefile in this directory:
make lib.
Eventually slight changes have still to be made in the makefiles.
Create the directory
/u/haduser/new/lib
Copy the script "linklib" from /u/halo/new/lib
and run it: linklib
This will set links to the libraries in the different module directories.
To create an executable, there are two possibilities:
make exe in directory../geant/new
(or in one of the directories for the different detectors) will create the executable
hgeant.
make exe in directory ../ggeo/new will create the
executable hadgeo.
Attention: Some of the modules contain the file
geantdef.h. This file is included in some makefiles
and contains the precompiler flags to create different executables:
With the flag WITHGEANT an executable is created which only reads
the geometry and hit definition from file and creates it in Geant.
With the flags WITHGEANT and additional GEANT_MDC, GEANT_TOF, GEANT_RICH,
GEANT_SHOW (depends on the module) the executable contains also the event
processing.
You should not use the precompiler flags WITHORACLE and GEOORA_OUT unless you
have Oracle available on your platform and in that case also the modules
ora and gora are needed.