Modify values of a branch

Dear ROOT users,

I have some output ROOT file from my analysis which has a few trees inside of it:



Where for example subbranch1 is the momentum of the particle. I need to add another SubBranch to the DaughterBranch e.g. “mySpecialBranch” with a value I am reading from a CSV file. It is not possible to do this upon creation of the ROOT file it has to be done after the fact.

  1. Is this approach possible, or can you only modify an existing branch? How do I approach this.
  2. If this approach is not possible can anyone suggest another way? The new branch with the special values have to be inside of the ParentTree.


I can suggest something relatively easy if you are willing to accept this new branch to be attached to ParentTree. To make the example really working out of the box, can you share a root file with a tree containing just a few events and your CSV file (again, a few events are more than enough)?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.