Hi. In 2009 it was noted that
you can now disable the generation of these messages if you compile RooFit code with the flag
-D__ROOFIT_NOBANNER
.
However, engaging __ROOFIT_NOBANNER
in CMake options
cmake \
-Dall=OFF \
-Dsoversion=ON \
-Dgsl_shared=ON \
-DCMAKE_CXX_STANDARD=17 \
-Droot7=ON \
-Dfortran=OFF \
-Droofit=ON \
-Droostats=ON \
-Dhistfactory=ON \
-Dminuit2=ON \
-D__ROOFIT_NOBANNER=ON \
-Dxrootd=ON \
-Dbuiltin_xrootd=OFF \
-DXROOTD_ROOT_DIR=/usr/local/venv/bin \
-Dvdt=ON \
-Dbuiltin_vdt=ON \
-Dpyroot=ON \
-DPYTHON_EXECUTABLE=$(which python3) \
-DCMAKE_INSTALL_PREFIX=/usr/local/venv \
-S root_src \
-B build
seems to have no effect as
$ python -c 'from ROOT import RooRealVar'
will still raise the RootFit banner.
What does work, is adding RooFit.Banner: no
to a user’s .rootrc
file, as advocated for in this commit from 2015
as seen in this example
$ docker run --rm -ti atlasamglab/stats-base:root6.24.06
root@8912dae62d22:~/data# python -c 'from ROOT import RooRealVar' # Get banner
RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
root@8912dae62d22:~/data# echo 'RooFit.Banner: no' > ~/.rootrc
root@8912dae62d22:~/data# python -c 'from ROOT import RooRealVar' # No banner now
(This is perhaps of interest to @gwatts given his question in 2012.)
It would still be desirable to globally disable the banner at compile time, though. Do people have any thoughts why -D__ROOFIT_NOBANNER=ON
in CMake seems to have no effect?
For reference, the last time the code that deals with __ROOFIT_NOBANNER
was edited was in 2021 in
when it was moved to roofit/roofitcore/src/Initialisation.cxx
(which made it into release v6.24/06
).
Please read tips for efficient and successful posting and posting code
_ROOT Version: 6.24/06
Platform: Debian bullseye
Compiler: g++ (Debian 10.2.1-6) 10.2.1 20210110