# Storing 2D vector \[--\> vector\<vector\<...\> \>\] into a TTree

**URL:** <https://root-forum.cern.ch/t/storing-2d-vector-vector-vector-into-a-ttree/14331>\
**Category:** ROOT\
**Created:** [May 22, 2012, 12:44pm UTC](https://root-forum.cern.ch/t/storing-2d-vector-vector-vector-into-a-ttree/14331 "2012-05-22T12:44:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [May 22, 2012, 2:53pm UTC](https://root-forum.cern.ch/t/storing-2d-vector-vector-vector-into-a-ttree/14331/2 "2012-05-22T14:53:31Z")

</div>

Try: `root [0] .x trial.cxx` and/or: `root [0] .x trial.cxx++` and/or: ``root-config --cxx --cflags` -O2 -W -Wall -o trial trial.cxx `root-config --glibs`
./trial` and then: `root [0] TFile f("trial.root", "READ");
root [1] tree->Print();
root [2] tree->Draw("fltvv");`  
See also: [http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=14990&p=64375#p64375](http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=14990&p=64375#p64375)

P.S. If the above compilation command does not work for you, try: `g++ `root-config --cflags` -O2 -W -Wall -o trial trial.cxx `root-config --glibs`
./trial`  
[trial.cxx](https://root-forum.cern.ch/uploads/default/original/2X/5/57395fbecfaa704d9ae13e797e63d21875be0dbe.cxx) (4.44 KB)

---

_[View the full topic](https://root-forum.cern.ch/t/storing-2d-vector-vector-vector-into-a-ttree/14331)._
