Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10396

Failure when instantiating RDataFrame::Fill

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PyROOT
    • Labels:
      None
    • Environment:

      Any

    • Development:

      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.

        Attachments

          Activity

            People

            • Assignee:
              etejedor Enric Tejedor Saavedra
              Reporter:
              etejedor Enric Tejedor Saavedra
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: