RDF issue with CMS MiniAOD branch

I try to open an internal CMS MiniAOD file with RDF (both in SWAN and lxplus CLI python) and when I do df.Display() I get these errors:

TypeError: Template method resolution failed:
  none of the 3 overloaded methods succeeded. Full details:
  ROOT::RDF::RResultPtr<ROOT::RDF::RDisplay> ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Display(initializer_list<string> columnList, int nRows = 5, unsigned long nMaxCollectionElements = 10) =>
    TypeError: takes at least 1 arguments (0 given)
  ROOT::RDF::RResultPtr<ROOT::RDF::RDisplay> ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Display(const vector<string>& columnList, int nRows = 5, unsigned long nMaxCollectionElements = 10) =>
    TypeError: takes at least 1 arguments (0 given)
  ROOT::RDF::RResultPtr<ROOT::RDF::RDisplay> ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Display(basic_string_view<char,char_traits<char> > columnNameRegexp = "", int nRows = 5, unsigned long nMaxCollectionElements = 10) =>
    runtime_error: TTree leaf l1tJetBXVector_caloStage2Digis_Jet_RECO.obj.data_.puDonutEt_[4] has both a leaf count and a static length. This is not supported.
  ROOT::RDF::RResultPtr<ROOT::RDF::RDisplay> ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Display(basic_string_view<char,char_traits<char> > columnNameRegexp = "", int nRows = 5, unsigned long nMaxCollectionElements = 10) =>
    runtime_error: TTree leaf l1tJetBXVector_caloStage2Digis_Jet_RECO.obj.data_.puDonutEt_[4] has both a leaf count and a static length. This is not supported.

Followed by this - which also appears if I open the file in the ROOT CLI on lxplus:

Summary
Warning in <TClass::Init>: no dictionary for class edm::BranchDescription is available
Warning in <TClass::Init>: no dictionary for class edm::BranchID is available
Warning in <TClass::Init>: no dictionary for class edm::Hash<1> is available
Warning in <TClass::Init>: no dictionary for class edm::ParameterSetBlob is available
Warning in <TClass::Init>: no dictionary for class edm::ThinnedAssociationsHelper is available
Warning in <TClass::Init>: no dictionary for class edm::EventAuxiliary is available

What could be the reason that RDF throws an error where simple ROOT does not? When I do Events->Print() in the ROOT CLI I see all branches without errors.

Funnily, this branch l1tJetBXVector_caloStage2Digis_Jet_RECO.obj.data_.puDonutEt_[4] can be read out using uproot without problems :slight_smile:


ROOT Version: 6.24/06
Platform: lxplus/SWAN
Compiler: slc7_amd64_gcc10


Moin Artur, thanks for asking and using RDataFrame :smiley:

For this question, we need to ping the RDF expert @eguiraud who can probably help with this!

Hi @artlbv ,

and welcome to the ROOT forum!

I think the interesting part of the error message is TTree leaf l1tJetBXVector_caloStage2Digis_Jet_RECO.obj.data_.puDonutEt_[4] has both a leaf count and a static length. This is not supported. (the missing dictionaries will be a problem if you want to read those classes, otherwise they are harmless, and the PyROOT “template method resolution failed” is likely a consequence of the first error I mentioned.

Now – my educated guess as to why RDF can’t read l1tJetBXVector_caloStage2Digis_Jet_RECO.obj.data_.puDonutEt_[4] is that TTreeReader (which RDF uses internally for I/O) does not support that case. But I would have to verify this claim because RDataFrame pre-emptively errors out before even trying to read such a branch with TTreeReader. Would you be able to share a file (even with just that one branch, even with just a few events) that reproduces the problem, so I can take a look directly? If not, could you please try to read that branch with TTreeReader? See examples at ROOT: TTreeReader Class Reference .

Cheers,
Enrico

P.S.

ah, is that a 2-dimensional array? RDataFrame does not support 2-dimensional arrays very well at the moment unfortunately. I may try to propose a workaround given an input file that reproduces the issue.

Right, it seem it is a 2d array, at least based on what I can see with uproot.

I’m not relying on RDF and that particular branch at the moment actually, so it’s not an urgent issue.
I just wanted to report this – and good to know this is on your radar.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.