Description
The following reproducer, translated from tutorial df005_fillAnyObject, fails to instantiate a template:
>>> import ROOT |
>>> rdf = ROOT.RDataFrame("myTree", "df005_fillAnyObject.root") |
>>> th1d = rdf.Fill['double'](ROOT.TH1D("th1d", "th1d", 64, 0, 128), ["b1"]) |
Traceback (most recent call last):
|
File "<stdin>", line 1, in <module> |
TypeError: Could not instantiate Fill<double>: |
Failed to instantiate "Fill<double>(TH1D&,std::initializer_list<std::string>)" |
|
A similar error happens if an std::vector is passed as parameter to specify the columns instead of a Python list:
>>> import ROOT |
>>> rdf = ROOT.RDataFrame("myTree", "df005_fillAnyObject.root") |
>>> v = ROOT.std.vector['string']() |
>>> v.push_back("b1") |
>>> th1d = rdf.Fill['double'](ROOT.TH1D("th1d", "th1d", 64, 0, 128), v) |
Traceback (most recent call last):
|
File "<stdin>", line 1, in <module> |
TypeError: Could not instantiate Fill<double>: |
Failed to instantiate "Fill<double>(TH1D&,std::vector<string>&)" |
The issue is both in current PyROOT and experimental.