You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the number of dataset in a workspace is larger than or equal to 10. Renaming a dataset inside the workspace will not work in the sense that calling ws.data(<new_dataset_name>) will return nil and calling ws.data(<old_dataset_name>) will return the correct dataset but with the name changed.
To Reproduce
importROOTROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.ObjectHandling)
ws=ROOT.RooWorkspace()
ws.factory("Gaussian::pdf(x[0,10],mu[4,0,10],sigma[1.0,0.1,10.0])")
pdf=ws.pdf("pdf")
x=ws.var("x")
n_dataset=10foriinrange(n_dataset):
dataset=pdf.generate(ROOT.RooArgSet(x), ROOT.RooFit.NumEvents(1000), ROOT.RooFit.Name(f"asimovData_{i}"))
ws.Import(dataset)
ws.data("asimovData_0").SetName("combData")
# this gives nilprint(ws.data("combData"))
# this gives "combData"print(ws.data("asimovData_0").GetName())
If n_dataset is changed to 9, ws.data("combData") will give the correct dataset and ws.data("asimovData_0") will give nil
Setup
ROOT 6.24, 6.26 (from LCG)
The text was updated successfully, but these errors were encountered:
When overriding `SetName` in RooDataHist and RooDataSet, we need to use
the function from the direct base class RooAbsData, because this one is
already overriding the TNamed function to deal with the RooNameReg
correctly.
Closesroot-project#11414.
When overriding `SetName` in RooDataHist and RooDataSet, we need to use
the function from the direct base class RooAbsData, because this one is
already overriding the TNamed function to deal with the RooNameReg
correctly.
Closes#11414.
When overriding `SetName` in RooDataHist and RooDataSet, we need to use
the function from the direct base class RooAbsData, because this one is
already overriding the TNamed function to deal with the RooNameReg
correctly.
Closesroot-project#11414.
When overriding `SetName` in RooDataHist and RooDataSet, we need to use
the function from the direct base class RooAbsData, because this one is
already overriding the TNamed function to deal with the RooNameReg
correctly.
Closes#11414.
vgvassilev
pushed a commit
to vgvassilev/root
that referenced
this issue
Oct 1, 2022
When overriding `SetName` in RooDataHist and RooDataSet, we need to use
the function from the direct base class RooAbsData, because this one is
already overriding the TNamed function to deal with the RooNameReg
correctly.
Closesroot-project#11414.
Describe the bug
If the number of dataset in a workspace is larger than or equal to 10. Renaming a dataset inside the workspace will not work in the sense that calling
ws.data(<new_dataset_name>)
will return nil and callingws.data(<old_dataset_name>)
will return the correct dataset but with the name changed.To Reproduce
If
n_dataset
is changed to 9,ws.data("combData")
will give the correct dataset andws.data("asimovData_0")
will give nilSetup
ROOT 6.24, 6.26 (from LCG)
The text was updated successfully, but these errors were encountered: