RooDataSet Error


I have a Roofit example found somewhere.
The following is the code fragment to import the variables in the TNtuple into RooDataSet.

        using namespace RooFit;

        // Create variables to load from the ntuple.
        RooRealVar Dmode("Dmode", "decay mode of D candidate", -1, 1000);
        RooRealVar DdeltaE("DdeltaE", "delta E of D candidate", -0.1, 0.1, "GeV")
        RooArgSet ntupleVarSet(Dmode, DdeltaE);

        TFile* file1 = new TFile("data33.root");
        TTree* tree1 = file1->Get("RooFitExampleProc/nt1");
        RooDataSet dataSet("ntuple_of_D_candidates", "ntuple of D candidate", tree1, ntupleVarSet);

When I run it, the code issue the following message.

How can I import the variables without the error message?
I attached root file.

Thanks in advance.
data33.root (179 KB)

There seems to be no problem in importing
In spite of the above error message.

I can plot the dataset.

I could know it after I modified the roofit code not to issue the message like this.

roofit_patch.txt (1.63 KB)


I’ll have a look at this.

Can you tell me which ROOT version you are using and what
the actual branch types are in the tree you are attempting
to import?


Thanks, Wouter

I’m using ROOT of version 5.10 with RooFit of v2.07.
All branch types in tree are ‘Float_t’(float).