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:
  1. 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
    

  2. You work with the HADES-CVS (code management system).

    The code for the HADES Geant package is packed in different modules:
    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

  1. 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

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. To create an executable, there are two possibilities:
    1. make exe in directory../geant/new (or in one of the directories for the different detectors) will create the executable hgeant.
    2. 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: 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.