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

RDataFrame::Cache fails when used with RDataFrame::Alias

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.18/04
    • Fix Version/s: 6.22/00
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux, installed using conda. Using PyROOT.

      Description

      When using RDataFrame::Alias:

      In [1]: import ROOT
         ...: ROOT.ROOT.EnableImplicitMT()
         ...: rdf = ROOT.RDataFrame('PhaseSpaceTree', 'root://eospublic.cern.ch//eos/opendata/lhcb/AntimatterMatters2017/data/PhaseSpaceSimulation.root')
         ...: rdf = rdf.Alias('H1_PX2', 'H1_PX')
         ...: rdf.Cache('H1_PX2')
      ---------------------------------------------------------------------------
      TypeError                                 Traceback (most recent call last)
      <ipython-input-1-2af46e645915> in <module>
            3 rdf = ROOT.RDataFrame('PhaseSpaceTree', 'root://eospublic.cern.ch//eos/opendata/lhcb/AntimatterMatters2017/data/PhaseSpaceSimulation.root')
            4 rdf = rdf.Alias('H1_PX2', 'H1_PX')
      ----> 5 rdf.Cache('H1_PX2')
       
      TypeError: can not resolve method template call for 'Cache'
      

      When using RDataFrame::Define:

      In [2]: import ROOT
         ...: ROOT.ROOT.EnableImplicitMT()
         ...: rdf = ROOT.RDataFrame('PhaseSpaceTree', 'root://eospublic.cern.ch//eos/opendata/lhcb/AntimatterMatters2017/data/PhaseSpaceSimulation.root')
         ...: rdf = rdf.Define('H1_PX2', 'H1_PX')
         ...: rdf.Cache('H1_PX2')
      Out[2]: <ROOT.ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void> object at 0x559b71894e30>
      

      If this is expected and not a bug, can the error message be clearer.

        Attachments

          Activity

            People

            • Assignee:
              swunsch Stefan Wunsch
              Reporter:
              cburr Chris Burr
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: