How to create a tree branch of two dimensional vector

Hi,
I want to create a branch of two dimensional vector. I tried the below but it doesn’t work:

vector <vector > vecEBHB;
TTree treeDB(“treeDB”,“tree DB”);
treeDB.Branch(vector<vector >vecEBHB , “vecEBHB”);

Could you correct me please?
Thanks
Gumus

Hi,

You need to provide the dictionary for vector<vector > and simply do (as usual):[code]vector <vector > * vecEBHB = new vector <vector >;
TTree treeDB(“treeDB”,“tree DB”);
treeDB.Branch(“myvectorofvector”,&vecEBHB);[code]Cheers,
Philippe

PS. Please ‘disable’ the html in your post when copy/pasting code.

Hi,
Thanks. I did that. It gives me the below error:

Error in TTree::Branch: The pointer specified for myvectorofvector is not of a class known to ROOT

Gumus

Then you have not generated (or not loaded) the dictionary for vector<vector< float> >.

Cheers,
Philippe.