Home | News | Documentation | Download

RDataFrame (python) seg faulting on central NanoAODv5 (CMS)


ROOT Version: 6.18.00 and nightly build
Platform: Ubuntu 18.04
Compiler: N/A


I’ve been playing around with python, RDataFrame, and the NanoAOD format (I’m on CMS). Up until this point, I had been running on a slimmed and skimmed version of the central NanoAOD that is produced with NanoAOD-tools and everything has worked quite well.

However, when I try to run over the central NanoAODv5, I’m met with a segmentation violation that I’m having a hard time deciphering. I’ve attached a minimum “working” example and the resulting seg fault. The example is able to count the events in the RDataFrame but seg faults after I apply a filter and ask the filter to count the remaining events (I get the same issue with a Report or Histo1D so I suspect it’s from starting the evaluation of the filtered object). I’m happy to privately send along the location of an example file on EOS.

I’ve attempted the following with no success:

  • Turn off MT
  • Update from 6.18.00 to master release on GitHub
  • Swap ROOT.RDataFrame("Events",filename) for ROOT.RDataFrame(t) where t is the TTree from the file

Thanks for looking!

*reproducer.py (256 Bytes) reproducer_segfault.txt (12.7 KB)

I promise that I did search for the forums for about an hour before posting this :slight_smile: Despite that effort, I just found the solution here while browsing some more.

The slim+skim I was using already made a selection so that a collection like FatJet would not be empty meaning my code worked fine. However, the central NanoAOD does not have that protection and as explained in the post, the RDataFrame Filter will not do that check for you!

1 Like

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