This page covers the one-time steps to configure and build ATTPCROOT on a new machine. After completing these steps, day-to-day work uses only source build/config.sh and cmake --build build — the environment variables below are never needed again.
FairSoft and FairRoot must already be installed on the machine. FairSoft provides ROOT, Geant4, and VMC. FairRoot provides the task/run framework.
These two variables tell CMake where FairRoot and FairSoft are installed. They only need to be set in the shell session where you run cmake for the first time:
export FAIRROOTPATH=/path/to/your/fairroot/install
export SIMPATH=/path/to/your/fairsoft/installThese are machine-specific. Ask your sysadmin or check the FairRoot/FairSoft install documentation for the correct paths on your system.
Run CMake out-of-source from the repo root:
cmake -S . -B buildIf HDF5 is not bundled with your FairSoft installation, add its prefix:
cmake -S . -B build -DCMAKE_PREFIX_PATH=/path/to/hdf5A successful configure generates build/config.sh. This file captures the full runtime environment and is sourced before any subsequent build or analysis session.
cmake --build build -j10Adjust -j to your CPU count.
From this point on:
- Before any session and to rebuild: see daily-use.md
The FAIRROOTPATH and SIMPATH variables from Step 1 are baked into build/config.sh and do not need to be set again.