Reading std vector of vectors

Hi everyone,

I have a Tree (was not me that create it) in which there is a branch variable of type vector< vector< unsigned int>>. If a declare one variable as that to address the branch arises the error:

I tried in many ways to build some structure to read that branch, but I have no success. Do you have some suggestion?

Hi,

a dictionary is needed. Root does not provide by default dictionaries for vector of vectors.
In order to prepare it, you can follow these instructions:
classes.h

#include <vector>

sel.xml

<rootdict>
    <class name="vector<vector<unsigned int>>" />
</rootdict>

commands

genreflex classes.h -s sel.xml --rootmap al.rootmap --rootmap-lib libVectVect.so
g++ -O2 classes_rflx.cpp -fPIC -shared `root-config --cflags --libs` -o libVectVect.so

In order to automatically load the library when needed, e.g. when opening the file, make sure to have the pcm, rootmap and so files in the LD_LIBRARY_PATH or in ./.

Cheers,
Danilo

Thank you so much for help me!!