# Root Trees Workflow

**URL:** <https://root-forum.cern.ch/t/root-trees-workflow/46922>\
**Category:** Newbie\
**Tags:** tree\
**Created:** [September 21, 2021, 11:07am UTC](https://root-forum.cern.ch/t/root-trees-workflow/46922 "2021-09-21T11:07:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [September 22, 2021, 4:13am UTC](https://root-forum.cern.ch/t/root-trees-workflow/46922/6 "2021-09-22T04:13:32Z")

</div>

What didn’t work, exactly? push\_back should work to “fill” vectors.  
As side note, and just my two cents: I’d say if you need vectors (or variable size elements), I try to [avoid structs in trees](https://root-forum.cern.ch/t/filling-mixed-typed-ttree-with-python/34415/3), since ROOT will expect contiguous memory for consecutive members of the struct and the variable number of elements could cause trouble depending on the type (not necessarily, but something to be careful about); you can use separate branches for each variable (Event, channel,…), which will need SetBranchAddress for each one, but is generally safer, I think.

---

_[View the full topic](https://root-forum.cern.ch/t/root-trees-workflow/46922)._
