ROOT Version: 6.24.06
Platform: wsl1, ubuntu20.04
Compiler: gcc9.4.0
Dear rooters,
I have a problem with mixing Multi/Single thread processing of rdataframe.
The thing is that my events are not entirely independent; I am running MC collisions simulation that considers a single collision event as a few (30 in my case) events-at-given-time, so it stacks them one-by-one into tree. It would be ok if I had a separate “timecount” column for them, but it turns out this simulation framework does not save such column.
In single thread, this is not a big deal since I can run
df = df.Define("tcount", "rdfentry_%30")
However, all other calculations except for this definition could use multithreading!
Therefore, the question arises, if it is possible to calculate that specific column in single-threat fashion. I tried a few possibilities, like
ROOT.EnableImplicitMT(args.thread_count)
rdf = ROOT.RDataFrame(tr)
ROOT.DisableImplicitMT()
rdf = rdf.Define("tcounter", "rdfentry_%{}".format(final_time))
ROOT.EnableImplicitMT(args.thread_count)
, but apparently this definition is being calculated at multi-threading mode anyway.
Is there any way to bypass this, without using intermediate Snapshot / Cache (I am a bit concerned regarding the full size of event TChain)?