Hello,
I would like to select and store a subset of entries from the original big TTree that contains branches with STL collections. Here is an example of the code:
import ROOT
ROOT.gInterpreter.GenerateDictionary('vector<ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float> > >')
df = ROOT.RDataFrame('events', 'data.root')
df = df.Filter(...)
df.Snapshot('events', 'filtered.root', '.*')
When I am trying to run it I’m getting errors similar to this one:
Error in <TTree::Branch>: The class requested (vector<ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float> > >) for the branch "lep_p4" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (vector<ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<float> > >) to avoid to write corrupted data.
So, it seems that ROOT.gInterpreter.GenerateDictionary
does not make any effect. Could you, please, suggest me how to solve this error?
Thank you!
Cheers,
Konstantin.
ROOT Version: 6.18/04
Platform: x86_64-slc6
Compiler: gcc8