RDataFrame: Cut depending on event number?

Hi there.

Is there a simple method to apply cuts depending on the event number with RDataFrame?
For example, using

  • first 1,000 events
  • last 1,000 events
  • from 1,000th to 2,000th events
  • odd-numbered events

and so on.


Hi @haltack ,
you can use a Range call for that purpose in single-thread runs.
If you need multi-threading + event ranges, you have to add an appropriate TEntryList to the TTree (or TChain) manually, and then pass the TTree (or TChain) to RDataFrame’s constructor.

I hope this helps!

1 Like

This is exactly what I need. Thank you!

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