Get and compile the examples
To install the RecPack examples you should first get the git RecPack distribution and follow the instructions to install the library.
Once this is done set the evironment variables to locate the recpack library and the examples:
export RECPACK_INCLUDE_DIR="in principle this is the directory RecPack/recpack in your system"
export RECPACK_LIBRARY_DIR="in principle this is the directory RecPack/recpack in your system"
export RECPACK_SOURCE_DIR="in principle this is the directory RecPack/recpack in your system"
export RECPACK_EXAMPLES_DIR="in principle this is the directory RecPack/examples in your system"
And tell the system where the CLHEP library is (not needed to compile but to run), by setting the LD_LIBRARY_PATH (DYLD_LIBRARY_PATH in MacOS) environment variable:
> export LD_LIBRARY_PATH=$CLHEPSYS/lib:$LD_LIBRARY_PATH
There is also a script setup_examples.sh under RecPack/examples that you can run to setup the above 5 env variables.
For examples that need the recpack ROOT geometry interface, the ROOTSYS env variable must be set before compiling:
> export ROOTSYS="folder of ROOT in your system" (ONLY FOR EXAMPLES USING GEOMETRY INTERFACE)
Then go inside one of the examples and follow the usual procedure to create the Makefile
> cmake .
and to compile
> make