RDF read std::vector<std::vector<double>> from TTree

Dear root experts,
I have a TTree with various leafs, the type of one of those is std::vector<std::vector>.
I read the tree using the RDF libraries, perform operations on the leafs and finally I write the new TTree with the snapshot method of the RDF.

I don’t perform operations of the std::vector<std::vector> leaf but the Snapshot does.

In ROOT 6.22 I have no problems, but on the new shiny 6.24 have the following:

Error in <TTree::Branch>: The class requested (vector<vector<double>,ROOT::Detail::VecOps::RAdoptAllocator<vector<double> > >) for the branch "layerBarEnergy" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (vector<vector<double>,ROOT::Detail::VecOps::RAdoptAllocator<vector<double> > >) to avoid to write corrupted data.
RDataFrame::Run: event loop was interrupted
terminate called after throwing an instance of 'std::logic_error'
  what():  Trying to insert a null branch address.

Do I need to explicitly create a dictionary for std::vector<std::vector>? I did but nothing seems to change.

Am I missing something?
Thanks for your support


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.24/06
_Platform: centos7
_Compiler: gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

Hi @ecatanzani; I am sure @eguiraud can help you with this.


Hi @ecatanzani ,
as per the error message creating a dictionary should teach ROOT to do I/O of the nested vector.

As that does not seem to work can you please share a simplified code + data that reproduces the issue so that we can investigate?

(note that I will be off for the next 2 weeks – but I will ping some other expert to help out in the meanwhile)


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.