Below is a very simple reproducer of something that seems a problem:
x=ROOT.RooRealVar('x', '', 0, 10)
m=ROOT.RooRealVar('m', '', 0, 10)
s=ROOT.RooRealVar('s', '', 1, 10)
g=ROOT.RooGaussian('g', '', x, m, s)
obj = w.genobj('g')
l_obj = w.allGenericObjects()
if not obj:
The workspace has objects, neither function is able to find them:
Please read tips for efficient and successful posting and posting code
Hi @rooter_03 ,
we need @moneta 's or @jonas 's help here, let’s ping them – but please consider that things might be slow during the holiday season.
It’s ok, I found a workaround. I am just letting you know so that it gets taken care some day.
alright then please consider converting this post into a bug report at github.com/root-project/root/issues .
Hi @rooter_03, thanks for reporting!
This is the expected behavior, actually. A RooWorkspace can contain 4 classes of object:
- A RooAbsArg, which you can get with
pdf() if the object is a RooRealVar/RooAbsPdf)
- A RooAbsData, which you can get with
- A RooArgSet, which you can get with
- Any other object of a class inheriting from TObject, which you can get with
If you want to retrieve any object, no matter which of the 4 cases it belongs to, you do this with RooWorkspace::obj() and not RooWorkspace::genob()j.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.