Dear ROOT Developers,
I am using RDataFrame Snapshot with PyRoot. I would like to execute the snapshot lazily. I know that one can do this in C++ using the RSnapshotOption fLazy . Can I do this with PyRoot, too? I would like to export all available columns.
Cheers,
Ben
_ROOT Version: 6.14.08
amadio
May 16, 2019, 11:50am
2
Yes, you should be able to. Please try it and let us know if you have a problem with it. Cheers,
Hi amadio,
thank you for your answer. So how could I do this?
df.Snapshot(tree,file,"all",fLazy)
Hello again,
I guess this should work?
from ROOT import RDataFrame
import ROOT
rdf = RDataFrame("myTree", "myFile")
#define snapshot options
snapshotOptions = ROOT.RDF.RSnapshotOptions()
snapshotOptions.fLazy = True #only setting fLazy here, for other options see https://root.cern/doc/master/structROOT_1_1RDF_1_1RSnapshotOptions.html
rdf.Snapshot("outputTree", "newFile", "", snapshotOptions) #the "" in the output columns means, output all
amadio
May 16, 2019, 12:49pm
5
Yes, the second version should work.
Thank you amadio! I tested it and it seems to work.
system
Closed
May 30, 2019, 12:50pm
7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.