ROOT Version: 6.26/10
Hi all,
I’m not sure if it is currently possible to do this, but I would like to be able to combine multiple RDataFrames into one, or at least write multiple RDataFrames into one file. eg for combining multiple TTrees into one:
snapshot_options = ROOT.RDF.RSnapshotOptions()
snapshot_options.fMode = "Update"
for tree in ['tree1', 'tree2', 'tree3']:
Rdf = ROOT.RDataFrame(tree, 'myfile.root')
Rdf.Snapshot("outTree", "out.root", ["branch1", "branch2"], snapshot_options)
This doesn’t work as it prompts me to make a new TTree instead of appending to the current TTree.
I’ve found a similar question without using dataframes: Append data to an existing TTree (with Branches)