Root event file division

Dear experts,

I have root file with events of one day long run. It takes long time to process it. In order to decrease the processing time is it possible to divide it into several files? So when I have several files I can process them in parallel.

Diana

Hi @dseitova ,

yes it’s possible, e.g. you can write an RDataFrame program that does it or use the command-line tool rooteventselector.

However, you don’t need to split your data in multiple files to parallelize the processing. For example, this selects some events and fills 2 histograms running on different chunks of events in parallel with RDataFrame:

ROOT::EnableImplicitMT(); // enable multi-thread parallel processing
ROOT::RDataFrame df("treename", "filename.root");
auto hist_x = df.Filter("x > 0").Histo1D("x");
auto hist_y = df.Filter("x <= 0 && muon_t.size() > 2").Histo1D("muon_pt");
// the event loop runs _here_, when you access a RDF result for the first time,
// and all registered results are generated in the same event loop
hist_x->Draw();

Cheers,
Enrico

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