hello experts
i’m trying to use rdataframe to add new column to dataset, the input root file structure is like this:
i defined a new branch weight_new and trying to save in tree tnpEleTrig/fitter_tree by doing this: fileName = "DYJetsToLL_LHEFilterPtZ-650ToInf_MatchEWPDG20_TuneCP5_13TeV-amcatnloFXFX-pythia8.root" treeName = "tnpEleTrig/fitter_tree" d = ROOT.RDataFrame(treeName, fileName) df=d.Define("weight_new", "2") df.Snapshot("tnpEleTrig/fitter_tree", "newfile.root")
Your Snapshot call looks ok, the relevant part of the error is "Unknown columns: ...".
I don’t know what might cause that. Which ROOT version is this with? Can you try with v6.26.06, and if you still get this error, can you share the input file with us (or also just with me privately)?
hi Enrico
idk how to check root version? i downloaded newest root 1.5 years ago
i copied the root file i use to my lxplus public space since it is too large and failed uploaded here: /afs/cern.ch/user/r/ryi/public/DYJetsToLL_LHEFilterPtZ-650ToInf_MatchEWPDG20_TuneCP5_13TeV-amcatnloFXFX-pythia8.root
thank you
I cannot reproduce the problem with ROOT v6.26.06 or a recent build of ROOT’s master branch. Please try this, e.g. on LXPLUS. Let us know in case you get the error with a recent LCG view on LXPLUS.
Hi Enrico
i tried on lxplus, still got the same error, then i checked the root version on lxplus, it’s 6.14/09
then i tried to download the ROOT v6.26.06 Release 62606 - ROOT
you can get recent ROOT versions on LXPLUS via the LCG releases, e.g. source /cvmfs/sft.cern.ch/lcg/views/LCG_102/x86_64-centos7-gcc11-opt/setup.sh gets you ROOT v6.26.04.
I will be off next week, I’d kindly ask @vpadulan to follow up if a recent ROOT version still has the problem.