Problem with RooNumConvPdf


can someone explain to me what is the problem with the following code:

gSystem->Load("libRooFit"); using namespace RooFit; RooRealVar x("x","x",-10,10); RooRealVar meanl("meanl","mean of Landau",2); RooRealVar sigmal("sigmal","sigma of Landau",1); RooLandau landau("landau","landau",x,meanl,sigmal); RooRealVar meang("meang","mean of Gaussian",0); RooRealVar sigmag("sigmag","sigma of Gaussian",2); RooGaussian gauss("gauss","gauss",x,meang,sigmag); RooNumConvPdf model("model","model",x,landau,gauss); RooPlot* frame = x.frame(); // The next line produces error model.plotOn(frame); landau.plotOn(frame,LineStyle(kDashed)); frame->Draw();
I’ve taken this code from ROOT’s manual on RooFit. The link to the manual is : The code can be found on page 31, example 8.

I’m using ROOT version 5.10.00. After running the code, the ROOT gives me this output:

[code]Processing D:\temp\temp_roofit.cpp…

←[1mRooFit v2.07 – Developed by Wouter Verkerke and David Kirkby←[0m
Copyright © 2000-2005 NIKHEF, University of California & Stanf
ord University
All rights reserved, please read

Error: C++ exception caught D:\temp\temp_roofit.cpp(13)
(const class RooPlot*)0x0
*** Interpreter error recovered ***[/code]


I’ve traced the problem to something going wrong in the initialization of the
numeric integration configuration database in RooFit. The problem is
essentially that I was trying to be to clever exploiting initialization of variables
upon dynamic loading of libraries. The code works when I compile the RooFit library standalone for development, but doesn’t when it is loaded in the ROOT environment.
A fix for this will be available shortly.