# Acessing custom class branches in python

**URL:** <https://root-forum.cern.ch/t/acessing-custom-class-branches-in-python/46116>\
**Category:** ROOT\
**Tags:** python\
**Created:** [August 1, 2021, 4:11pm UTC](https://root-forum.cern.ch/t/acessing-custom-class-branches-in-python/46116 "2021-08-01T16:11:26Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 5, 2021, 9:19pm UTC](https://root-forum.cern.ch/t/acessing-custom-class-branches-in-python/46116/11 "2021-09-05T21:19:04Z")

</div>

In principle, you would need to create a shared library:

```bash
`root-config --cxx --cflags` -fPIC -shared -I${DD4hep_DIR}/include ContDict.cxx -o libContDict.so `root-config --libs`

```

and then load it into ROOT before opening your file:

```bash
root [0] .L libContDict.so
root [1] new TBrowser()

```

---

_[View the full topic](https://root-forum.cern.ch/t/acessing-custom-class-branches-in-python/46116)._
