# How to properly save custom types to TTree branches in Python

**URL:** <https://root-forum.cern.ch/t/how-to-properly-save-custom-types-to-ttree-branches-in-python/55929>\
**Category:** ROOT\
**Tags:** python\
**Created:** [August 5, 2023, 4:01am UTC](https://root-forum.cern.ch/t/how-to-properly-save-custom-types-to-ttree-branches-in-python/55929 "2023-08-05T04:01:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [August 7, 2023, 1:54pm UTC](https://root-forum.cern.ch/t/how-to-properly-save-custom-types-to-ttree-branches-in-python/55929/2 "2023-08-07T13:54:58Z")

</div>

Hi,  
To store custom types in a ROOT tree you need fist to generate the dictionary and then you can also use them from Python. See for example [Fill Branch from Vector of Vectors - #2 by moneta](https://root-forum.cern.ch/t/fill-branch-from-vector-of-vectors/55906/2)

Lorenzo

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-properly-save-custom-types-to-ttree-branches-in-python/55929)._
