HannaPlusPlusInstallation

Aus HERMESwiki
Zur Navigation springen Zur Suche springen

Page maintainer: Andreas

Checked.png This page is considered done. It been reviewed by Hyon-Suk. There may be missing elements, but they are all flagged and the text has no errors.

Getting ready to build

Hanna++ needs certain parts of the r25 release of the HERMES software. It will not compile with older versions. Please set the environment variable HERMES_ROOT to /afs/desy.de/group/hermes/r25 before you continue.

Before you can compile the Hanna++ source you have to set the following environment variables:

For ROOT:

$> export ROOTSYS=/opt/products/root64/5.28.00
$> export PATH=$ROOTSYS/bin:$PATH
$> export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
$> export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH

For Hanna++:

$> export HANNAPLUSPLUS=<some_path>/Hanna++
$> export PATH=$HANNAPLUSPLUS/bin:$PATH
$> export LD_LIBRARY_PATH=$HANNAPLUSPLUS/lib:$LD_LIBRARY_PATH
$> export PYTHONPATH=$HANNAPLUSPLUS/lib:$PYTHONPATH

Where <some_path> is the path to the location in which you want to keep the source distribution.

Getting the sources

The Hanna++ sources are available via CVS on kirk.desy.de. To check out the latest version do the following:

$> cd <some_path>
$> export CVSROOT=:pserver:anoncvs@kirk.desy.de:/hermescvsroot
$> cvs login
(Logging in to anoncvs@kirk.desy.de)
CVS password: cvs
$> cvs -z3 checkout -P -r v1-0-0 Hanna++
U Hanna++/...
U ...

Compiling

To compile Hanna++ do the following:

$> cd Hanna++
$> ./configure
$> make

In case you are already using the new Hermes environment in pal.desy.de, take into account what is written in the Data preservation section and do:

$> ./configure --cc-compiler gcc --f77-compiler gfortran --use-environment

In both cases is very convenient to previously have defined the following environment variables:

export RDPIDLIBBASE=$HERMES_TOP/rdPIDLIB
export RDPIDLIB=$RDPIDLIBBASE/PDs
export RDANALYSISTOOLSBASE=$HERMES_TOP/rdAnalysisTools
export RDANALYSISTOOLS=$RDANALYSISTOOLSBASE/data

The configure script knows the following options:

  • --justroot
    Only compile ROOT part
    Disable ADAMO/DAD part
  • --nogeom
    Disable ADAMO features in geometry package.
  • --nopidlib
    Disable PIDLIB support
    If not set, Hanna++ assumes to find the PID library in the directory pointed by the environment variable RDPIDLIB.
  • --nordpidlib
    Disable Recoil PIDLIB support
    If not set, Hanna++ assumes to find the Recoil PID library in the directory pointed to by the environment variable RDPIDLIBBASE.
  • --nordtools
    Disable Recoil Analysis Tools support
    If not set, Hanna++ assumes to find the Recoil Analysis Tools library in the directory pointed to by the environment variable RDANALYSISTOOLSBASE.
  • --noayk
    Build without AYK library support.
  • --withthread
    Enable thread support (needed for client communication). See HannaPlusPlusClientComm for details.
  • --nopython
    Disable Python support.

Staying up to date

To keep your Hanna++ source directory up to date, do a cvs update once in a while (this will not work if you have downloaded a tarball):

$> cd <some_path>/Hanna++
$> cvs update -dP
$> make

Under normal circumstances it should be enough to just run make after you updated the sources. If you experience problems you can try a make dictclean followed by make which will regenerate the dictionaries. In case this does not help you will have to recompile by running make clean followed by make.

To update to a different version of Hanna++ do the following:

$> cd <some_path>/Hanna++
$> cvs update -r <rev>
$> make

Where <rev> is a revision of the sources. A list of revisions can be found on the Hanna++ Releases page.

To update to the HEAD revision (the latest version) of Hanna++ do the following:

$> cd <some_path>/Hanna++
$> cvs update -A
$> make

Be aware that the HEAD revision might contain a unstable version that will compile but may show some strange features. The standard Hanna++ user should use one of the released versions listed on the Hanna++ Releases page.

Macro Path

Hanna++ comes with a bunch of macros. To use them without having to specify the absolute path to the macro, add the following line to the file .rootrc in your home directory:

Unix.*.Root.MacroPath:  .:$HANNAPLUSPLUS/Macros:

ACLiC support

Hanna++ supports analysis module compilation at runtime. To use this feature please add the following lines to the file .rootrc in your home directory:

Unix.*.Root.IncludePath: -I$ROOTSYS/include -I$HANNAPLUSPLUS/include
ACLiC.IncludePaths:      -I$ROOTSYS/include -I$HANNAPLUSPLUS/include