-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Closed
Copy link
Labels
Description
Check duplicate issues.
- Checked for duplicates
Description
I need to process ROOT file, created with some relatively old ROOT version.
and I see that wih recent ROOT versions RDataFRame.Snapshot fails to process the file, while
for old versions of ROOT it succeds
OK:
( source /cvmfs/sft.cern.ch/lcg/views/LCG_107/x86_64-el9-gcc13-opt/setup.sh ; root.exe --version ; python ./tst_frame.py )
FAILURE:
( source /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc13-opt/setup.sh ; root.exe --version ; python ./tst_frame.py )
It reports:
ROOT Version: 6.36.02
Built for linuxx8664gcc on Jul 10 2025, 20:02:19
From tags/6-36-02@6-36-02
Error in <TTreeReaderValue::Get()>: Value reader for branch m34CPVMJ not properly initialized, did you call TTreeReader::Set(Next)Entry() or TTreeReader::Next()?
RDataFrame::Run: event loop was interrupted
Error in <TTreeReaderValue::Get()>: Value reader for branch m34CPVMJ not properly initialized, did you call TTreeReader::Set(Next)Entry() or TTreeReader::Next()?
RDataFrame::Run: event loop was interrupted
Error in <TTreeReaderValue::Get()>: Value reader for branch m34CPVMJ not properly initialized, did you call TTreeReader::Set(Next)Entry() or TTreeReader::Next()?
RDataFrame::Run: event loop was interrupted
Traceback (most recent call last):
File "/afs/cern.ch/user/i/ibelyaev/cmtuser/TEST/./tst_frame.py", line 18, in <module>
frame.Snapshot( 'MC2' , output , ( 'm34CPVMJ' , 'm234CPVMJ' , 'tmva_BDTG3' ) )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Template method resolution failed:
none of the 3 overloaded methods succeeded. Full details:
ROOT::RDF::RResultPtr<ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void> > ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Snapshot(string_view treename, string_view filename, initializer_list<string> columnList, const ROOT::RDF::RSnapshotOptions& options = RSnapshotOptions()) =>
out_of_range: RDataFrame: Action (Snapshot) could not retrieve value for column 'm34CPVMJ' for entry 0. You can use the DefaultValueFor operation to provide a default value, or FilterAvailable/FilterMissing to discard/keep entries with missing values instead.
ROOT::RDF::RResultPtr<ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void> > ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Snapshot(string_view treename, string_view filename, const ROOT::RDF::ColumnNames_t& columnList, const ROOT::RDF::RSnapshotOptions& options = RSnapshotOptions()) =>
out_of_range: RDataFrame: Action (Snapshot) could not retrieve value for column 'm34CPVMJ' for entry 0. You can use the DefaultValueFor operation to provide a default value, or FilterAvailable/FilterMissing to discard/keep entries with missing values instead.
bad argument type for built-in operation
ROOT::RDF::RResultPtr<ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void> > ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Snapshot(string_view treename, string_view filename, initializer_list<string> columnList, const ROOT::RDF::RSnapshotOptions& options = RSnapshotOptions()) =>
out_of_range: RDataFrame: Action (Snapshot) could not retrieve value for column 'm34CPVMJ' for entry 0. You can use the DefaultValueFor operation to provide a default value, or FilterAvailable/FilterMissing to discard/keep entries with missing values instead.
i
There are no problem with explicit TTree/TChain manipulations from this file, Only RDataFrame fails
Reproducer
The reproducer script tst_frame.py is rather trivial:
import ROOT
ROOT.ROOT.EnableImplicitMT( True )
## Input data
input = '/afs/cern.ch/work/e/enekraso/public/Bu2jpsikkpi/jkkpi/tmva/chains/chain_tmva_mc_tmva.root'
output = 'new_file.root'
chain = ROOT.TChain ( 'MC' )
chain.Add ( input )
## use shapshot
frame = ROOT.ROOT.RDataFrame ( chain )
output = 'new_file.root'
## FAILS!!
frame.Snapshot( 'MC2' , output , ( 'm34CPVMJ' , 'm234CPVMJ' , 'tmva_BDTG3' ) )
new_chain = ROOT.TChain ( 'MC2' )
new_chain.Add ( output )
new_chain.Draw ( 'm34CPVMJ' )
For simplicity it is also
linked here
If refers to the input ROOT file from public /afs/ directory, hopefully it is readable,
Input ROOT file is created with some very old ROOT verison (~5-7 years old)
( source /cvmfs/sft.cern.ch/lcg/views/LCG_107/x86_64-el9-gcc13-opt/setup.sh ; root.exe --version ; python ./tst_frame.py ; rm new_file.root )
( source /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc13-opt/setup.sh ; root.exe --version ; python ./tst_frame.py ; rm new_file.root )
ROOT version
problem occurs between 6.34 (OK) and 6.36 (FAILURE)
Installation method
cvmfs.cern.ch
Operating system
Linux, el9
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status