# Initializing a TBranch in PyROOT with a custom class in Python

**URL:** <https://root-forum.cern.ch/t/initializing-a-tbranch-in-pyroot-with-a-custom-class-in-python/63522>\
**Category:** ROOT\
**Tags:** python\
**Created:** [May 8, 2025, 1:48pm UTC](https://root-forum.cern.ch/t/initializing-a-tbranch-in-pyroot-with-a-custom-class-in-python/63522 "2025-05-08T13:48:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mdessole](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mdessole/32/34021_2.png) [@mdessole](https://root-forum.cern.ch/u/mdessole)\
**Post date:** [May 8, 2025, 3:11pm UTC](https://root-forum.cern.ch/t/initializing-a-tbranch-in-pyroot-with-a-custom-class-in-python/63522/2 "2025-05-08T15:11:12Z")

</div>

Hello @RobinS,

welcome to the ROOT Forum! You have first to generate the dictionary for your class and then you can use it from Python too. See [this example](https://root-forum.cern.ch/t/fill-branch-from-vector-of-vectors/55906/2) for a vector of vectors structure.

Cheers,  
Monica

---

_[View the full topic](https://root-forum.cern.ch/t/initializing-a-tbranch-in-pyroot-with-a-custom-class-in-python/63522)._
