Problems with dataset filling in RooFit

From: Antonio Augusto Alves Jr <aalvesju_at_cern.ch>
Date: Wed, 25 Jul 2007 17:59:05 -0300


Hi all,

I am using the last version of Root, and when I try run the standard RooFit script intro8 .cc
(http://roofit.sourceforge.net/docs/classref/examples/intro8.cc.html) I get series of very strange errors related to filling of the datasets defined in the script. The complete output is showed below, in the end of message. I got the same errors in my private script... Does someone have some idea about what is happening? Is RooFit compatible with Root v5.16.00?

P.S.: What does this error mean?

    Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1

     This error is symptomatic of a Tree created as a memory-resident Tree
     Instead of doing:
        TTree *T = new TTree(...)
        TFile *f = new TFile(...)
     you should do:
        TFile *f = new TFile(...)
        TTree *T = new TTree(...)

Regards,
A. Augusto


root [5] intro8()
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.y, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
RooDataSet::d: "d"
  Contains 1000 entries

  Defines RooArgSet::Dataset Variables: (Owning contents)
    1) RooRealVar::x: "x"
    2) RooRealVar::y: "y"

    3) RooCategory::c: "c"
  Caches RooArgSet::Cached Variables:

RooArgSet:::

  1. RooRealVar::0x91403d8::x : 9.0000 L(-10 - 10)
  2. RooRealVar::0x90fe428::y : 31.607 L(0 - 40)
  3. RooCategory::0x9140810::c : Plus

RooArgSet:::

  1. RooRealVar::0x91403d8::x : 8.0000 L(-10 - 10)
  2. RooRealVar::0x90fe428::y : 30.000 L(0 - 40)
  3. RooCategory::0x9140810::c : Minus

>> d1 has only columns x,c

Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
RooDataSet::d: "d"
  Contains 1000 entries
  Defines RooArgSet::Dataset Variables: (Owning contents)

  1. RooRealVar::x: "x"
  2. RooCategory::c: "c" Caches RooArgSet::Cached Variables:

>> d2 has only column y

Error in <TTree::Fill>: Failed filling branch:d.y, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
RooDataSet::d: "d"
  Contains 1000 entries
  Defines RooArgSet::Dataset Variables: (Owning contents)

  1. RooRealVar::y: "y" Caches RooArgSet::Cached Variables:

>> d3 has only the points with y>5.17

Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.y, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
RooDataSet::d: "d"
  Contains 973 entries

  Defines RooArgSet::Dataset Variables: (Owning contents)
    1) RooRealVar::x: "x"
    2) RooRealVar::y: "y"

    3) RooCategory::c: "c"
  Caches RooArgSet::Cached Variables:

>> d4 has only columns x,c for data points with y>5.17
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
RooDataSet::d: "d"
  Contains 973 entries
  Defines RooArgSet::Dataset Variables: (Owning contents)

  1. RooRealVar::x: "x"
  2. RooCategory::c: "c" Caches RooArgSet::Cached Variables:

>> merge d2(y) with d1(x,c) to form d1(x,c,y)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.y, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
RooDataSet::d: "d"
  Contains 1000 entries
  Defines RooArgSet::Dataset Variables: (Owning contents)

  1. RooRealVar::x: "x"
  2. RooCategory::c: "c"
  3. RooRealVar::y: "y" Caches RooArgSet::Cached Variables:

>> append data points of d3 to d1

Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.y, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_idx, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.y, nbytes=-1 Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.x, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.y, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
Error in <TTree::Fill>: Failed filling branch:d.c_lbl, nbytes=-1  This error is symptomatic of a Tree created as a memory-resident Tree  Instead of doing:

    TTree *T = new TTree(...)
    TFile *f = new TFile(...)
 you should do:

    TFile *f = new TFile(...)
    TTree *T = new TTree(...)
RooDataSet::d: "d"
  Contains 1973 entries
  Defines RooArgSet::Dataset Variables: (Owning contents)

  1. RooRealVar::x: "x"
  2. RooCategory::c: "c"
  3. RooRealVar::y: "y" Caches RooArgSet::Cached Variables:
    >> construct dh (binned) from d(unbinned) but only take the x and y
    dimensions,
    >> the category 'c' will be projected in the filling process
    WARNING setFitBins() IS OBSOLETE, PLEASE USE setBins() WARNING setFitBins() IS OBSOLETE, PLEASE USE setBins() RooDataHist::dh: "binned version of d" Contains 100 entries with a total weight of 1000 Defines RooArgSet::Dataset Variables: (Owning contents)
  4. RooRealVar::x: "x"
  5. RooRealVar::y: "y" Caches RooArgSet::Cached Variables: <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
    >> number of bins in dh : 100
    >> sum of weights in dh : 1000
    >> integral over histogram: 125
    >> retrieving the properties of the bin enclosing coordinate (x,y) =
    (0.3,20.5) bin center: RooArgSet::Dataset Variables: (Owning contents)
  6. RooRealVar::0x92426b0::x : 1.0000 L(-10 - 10) B(10)
  7. RooRealVar::0x925f4c8::y : 22.000 L(0 - 40) B(10) weight = 76
    >> Creating 1-dimensional projection on y of dh for bins with x>0
    RooDataHist::dh: "binned version of d" Contains 10 entries with a total weight of 500 Defines RooArgSet::Dataset Variables: (Owning contents)
  8. RooRealVar::y: "y" Caches RooArgSet::Cached Variables: Error: Function LineColor(kRed) is not defined in current scope teste.C:127: *** Interpreter error recovered *** root [6]
-- 

"O mais corrente neste mundo, nestes tempos em que às cegas vamos tropeçando, é esbarrarmos, ao virar a esquina mais próxima, com homens e mulheres na maturidade da existência e da prosperidade, que, tendo sido aos dezoito anos briosos revolucionários decididos a arrasar o sistema dos pais e pôr no seu lugar o paraíso, enfim, da fraternidade, se encontram agora, com firmeza pelo menos igual, repoltreados em convicções e práticas que, depois de haverem passado por qualquer das muitas versões do conservadorismo moderado, acabaram por desembocar no mais desbocado e reaccionário egoísmo. Em palavras não tão cerimoniosas, estes homens e estas mulheres, diante do espelho da sua vida, cospem todos os dias na cara do que foram o escarro do que são."

José Saramago, em Ensaio sobre a lucidez

=============================================

A. Augusto Alves Jr.

CBPF - Centro Brasileiro de Pesquisas Físicas
Rua Dr. Xavier Sigaud 150 – URCA
CEP 22290-180
Rio de Janeiro, RJ, Brazil.

Tel: (55)(21) 2141-7329
Fax: (55)(21) 2141-7556
Received on Wed Jul 25 2007 - 22:59:25 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 26 2007 - 11:50:02 CEST