Skip to content

Latest commit

 

History

History
28 lines (25 loc) · 678 Bytes

Upgrades.md

File metadata and controls

28 lines (25 loc) · 678 Bytes

Detector upgrades in O2

Conventions

Code for detector upgrades shall be developed in Detectors/Upgrades and DataFormats/Detectors/Upgrades. It is compiled only if the CMake option ENABLE_UPGRADES is activated, e.g.

cmake -DENABLE_UPGRADES=ON <src dir>

Upgrade-only CMake instructions should be protected as:

if(ENABLE_UPGRADES)
# ...
endif(ENABLE_UPGRADES)

Individual pieces of code to be compiled only when upgrades are built are to be guarded by precompiler macros:

#ifdef ENABLE_UPGRADES
// ...
#endif

The corresponding compiler definition is added automatically and globally.