Search/Navigation:
Related:
SLAC/EPP/HPS Public
Jefferson Lab/Hall B/HPS Run Wiki
S30XL-LESA/LDMX
Table of Contents minLevel 2
You must have these build tools available on the system.
These package dependencies must be installed as well (details covered below):
If you want to build the documentation then this is also required.
The default, shared Linux environment at SLAC can not be used as the version of gcc is too old.
A more recent environment can be setup and checked as follows.
Code Block | ||||
---|---|---|---|---|
| ||||
ssh rhel6-64 scl enable devtoolset-2 bash gcc --version |
You should see the following gcc version now.
No Format |
---|
(GCC) 4.8.2 20140120 (Red Hat 4.8.2-15) Copyright (C) 2013 Free Software |
This version of the compiler should support the C++11 standard.
An alternate compiler also needs to be setup to override the default one.
Code Block | ||||
---|---|---|---|---|
| ||||
export PATH=/apps/gcc/4.8.2/bin/:$PATH gcc --version |
You should see the following GCC version.
No Format |
---|
gcc (GCC) 4.8.2 |
This version should support C++11.
It is likely your system already has a recent enough version of CMake installed on it.
You can check for this from the shell.
Code Block | ||
---|---|---|
| ||
which cmake cmake |
It will print something like this if CMake is installed.
No Format |
---|
$ which cmake /usr/bin/cmake $ cmake cmake version 2.8.12.2 [...] |
If CMake is not found or the version is too old, then follow the Installing CMake guide to build it.
Code Block | ||
---|---|---|
| ||
cd workdir svn co svn://svn.freehep.org/lcio/trunk lcio-trunk cd lcio-trunk mkdir build cd build cmake -DINSTALL_DOC=OFF -DINSTALL_JAR=OFF .. make install cd .. export LCIO=$PWD |
Follow the instructions at the ROOT website to install it.
Then you will want to source the setup script which will set the ROOTSYS variable.
Code Block | ||
---|---|---|
| ||
. bin/thisroot.sh |
This should set ROOTSYS to point at your ROOT installation.
Code Block | ||
---|---|---|
| ||
cd workdir svn checkout http://svnsrv.desy.de/public/GeneralBrokenLines/tags/V01-16-02 GeneralBrokenLines cd GeneralBrokenLines/cpp mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=../.. .. make install cd ../.. export GBL_DIR=$PWD |
The project is stored in a public github repository. The code can be "cloned" i.e. copied to a users local machine by issuing the following commands from a terminal.
Code Block | ||
---|---|---|
| ||
cd /path/to/workdir git clone https://github.com/omar-moreno/hps-dst.git |
A github account is not required to clone the source code.
You may also want to use a tagged release. For instance, the v0.7 tag can be downloaded from the following URL.
https://github.com/omar-moreno/hps-dst/releases/tag/v0.7
Or you can execute these shell commands.
Code Block | ||||
---|---|---|---|---|
| ||||
wget https://github.com/omar-moreno/hps-dst/archive/v0.7.tar.gz tar zxvf v0.7.tar.gz cd hps-dst-0.7 |
Now you may build the project locally in the usual way.
Before the project is built, the following environment variables need to be set.
Code Block | ||
---|---|---|
| ||
ROOTSYS=/path/to/root GBL_DIR=/path/to/gbl/cpp LCIO=/path/to/lcio |
Then the project should be built as follows.
Code Block | ||||
---|---|---|---|---|
| ||||
cd hps-dst/ mkdir build; cd build cmake ../ make |
This will create the binaries in the build/bin directory along with the shared library HpsEvent.so in the build/lib directory, which contains the ROOT dictionary and HPS Event API.
The API documentation can be generated as follows:
Code Block |
---|
make doc |
This will generate both LaTeX and html documentation in the directory hps-dst/doc.