AliRoot
Appearance
ROOT
- 2025-10
ClassImp is not needed since many many years. ClassDef is required for classes inheriting from TObject, and an optional I/O optimization for another classes.
- https://github.com/root-project/web/pull/611
- https://github.com/root-project/web/pull/612
- https://github.com/eguiraud/root_dictionaries_tutorial/ (2021-05)
- https://root.cern/manual/io_custom_classes/#the-classdef-macro FINAL
return Form("x=%g, y=%g", x, y);
return Form("TGLSceneBase %s", fName.Data());
// inside a thread-local static character buffer
cmake ../xrootd-4.8.1/ -DCMAKE_INSTALL_PREFIX=/cern/xrootd-4.8.1 make; make install cd /cern; ln -s xrootd-4.8.1 xrootd
XRootD cannot be built in-source! Please run cmake <src-dir> outside the source directory and be sure to remove CMakeCache.txt or CMakeFiles if they exist in the source directory.
// ROOT 6.26 C++14 (2022-04 => 2024-03) // ROOT 6.28 C++14 (2023-02 => 2024-01) // ROOT 6.30 C++17 (2023-11 => 2024-01) // ROOT 6.32 C++17 (2024-05 => actual)
- https://root.cern.ch/building-root
- https://github.com/root-project/web/blob/main/install/build_from_source.md
- https://github.com/root-project/root-docker
- install in /cern/root_master (source dir) and build in /cern/root_master_build (out of source dir)
- it is not supported to build ROOT on the source directory
- location independent installation method
- by default
CMAKE_INSTALL_PREFIX=/usr/local - don't try
CMAKE_INSTALL_PREFIX=.(install files and up-to-date files => make install and make loop)
- Before trying to build ROOT, see the “Build Prerequisites” web page. In any case, when you are building a new ROOT version, make always sure that nothing in your environment variables (i.e. “ROOTSYS”, “PATH”, “LD_LIBRARY_PATH”) points to another existing version of ROOT (and that’s another good reason why there should be no ROOT related files in “standard” system locations, like “/usr/[bin|lib]” or “/usr/local/[bin|lib]”). [1]
- https://sft.its.cern.ch/jira/browse/ROOT-9309
- it's better to never set
ROOTSYS,PATHandLD_LIBRARY_PATHand never source thisroot.sh - https://github.com/root-project/root/commit/4e4e1d00d9a639969725069b6c7b4ebbcd875303
- it's better to never set
- https://root-forum.cern.ch/t/pyroot-experimental-not-working-in-6-20-06/40059/8
- recommended method
$ export | grep root declare -x LD_LIBRARY_PATH="/cern/xrootd/lib64" declare -x PATH=" :/cern/root/bin:/cern/xrootd/bin: " cd /cern git clone --depth 1 http://root.cern.ch/git/root.git root_master_source git clone --depth 1 http://root.cern.ch/git/root.git root_master git clone --branch master --depth 1 https://github.com/root-project/root.git root_master_src ln -s root_master root # PATH="/cern/root/bin" mkdir root_master_build/ cd root_master_build cmake /cern/root_master_src/ -Droofit=OFF -Dtmva=OFF -Dmathmore=OFF -DXROOTD_ROOT_DIR=/cern/xrootd/ -DCMAKE_INSTALL_PREFIX=/cern/root_master/ -Drpath=ON cmake /cern/root_master_source/ -Droofit=OFF -Dtmva=OFF -Dmathmore=OFF -Dhttp=ON -DXROOTD_ROOT_DIR=/cern/xrootd/ -DCMAKE_INSTALL_PREFIX=/cern/root_master/ -Drpath=ON -DCMAKE_CXX_STANDARD=17 -Droot7=ON # -Dfortran=ON (needed for h2root and g2root) cmake /cern/root_master -Droofit=OFF -Dtmva=OFF -Dmathmore=OFF -Dhttp=ON -DXROOTD_ROOT_DIR=/cern/xrootd -DCMAKE_INSTALL_PREFIX=/cern/root_master -Drpath=ON make make install
- old method
$ export | grep root declare -x LD_LIBRARY_PATH="/cern/root/lib:/cern/xrootd/lib64" declare -x PATH=" :/cern/root/bin:/cern/xrootd/bin: " declare -x ROOTSYS="/cern/root" cd /cern git clone --depth 1 http://root.cern.ch/git/root.git root_master ln -s root_master root # ROOTSYS="/cern/root" mkdir root_master_build/ cd root_master_build/ cmake /cern/root_master -Droofit=OFF -Dtmva=OFF -Dmathmore=OFF -Dhttp=ON -DXROOTD_ROOT_DIR=/cern/xrootd -DCMAKE_INSTALL_PREFIX=/cern/root_master make make install
- update
cd /cern/root_master_build git -C /cern/root_master pull rm /cern/root_master/etc/dictpch/allLinkDefs.h /cern/root_master/etc/allDict.cxx.pch /cern/root_master/etc/dictpch/allHeaders.h /cern/root_master/tutorials/hsimple.root make make install
- to start from a clean configuration it is recommended to delete the file root_master_build/CMakeCache.txt
- You can inspect the list of options and their descriptions by running
cmake -LH $PWDin the build directory - Allow to build ROOT without any Internet connection https://sft.its.cern.ch/jira/browse/ROOT-9163
- CMakeFiles/move_artifacts.dir/build.make find removed file(s)
- for building
clang-formatfrom ROOT LLVM/Clang source code add CMake variable-DCLANG_ENABLE_FORMAT=ON
make # build LibFormat library cd /cern/root_master_build/interpreter/llvm/src/tools/clang/tools/clang-format make # build ClangFormat stand-alone tool