I might have fixed it a few weeks ago. See this:
$ source /cvmfs/sft.cern.ch/lcg/views/LCG_97/x86_64-centos7-gcc9-opt/setup.sh
$ root 'histos.C+g(true)'
[...]
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_simPdf1_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
0.333333
0.333333
root [1] .q
$ root -l 'histos.C+g(false)'
root [0]
Processing histos.C+g(false)...
[...]
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_simPdf1_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
0.333333
0.666667
root [1] .q
OK - bug. Root version:
$ root
------------------------------------------------------------------
| Welcome to ROOT 6.20/02 https://root.cern |
| (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Mar 15 2020, 15:25:34 |
| From tags/v6-20-02@v6-20-02 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
root [0] .q
And now with the nightlies, i.e. the soon-to-be-released 6.22:
source /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/latest/x86_64-centos7-gcc9-opt/setup.sh
$ root -l 'histos.C+g(true)'
[...]
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_simPdf1_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
0.333333
0.333333
root [1] .x histos.C+g(false)
Info in <ACLiC>: unmodified script has already been compiled and loaded
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel_model_simPdf1_Int[obs_x_channel]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel)
0.666667
0.333333
0.333333