Hi,
I am working with data samples (root files) which are divided into several files all with the same trees in them and I need to add a branch to one of these trees and to fill it. So far, I have found the procedure to add a branch to an exisiting tree (in a older forum entry):
[quote]You can add new data to an existing Tree:
- open the file in “Update” mode
- get the Tree from the file
- set the branch(es) address
- continue your fill loop
- save the new Tree header mytree->Write()
- close the file
This works OK if you simply want to add new entries.
If you want to add one or more branches, you can proceeed like above
for the first 3 steps, then
- create your new branch
- fill ONLY this branch, making sure that you have the same number of entries
at the end in all your branches. - write the header, etc
[/quote]
Is that possible to do the same exact procedure on a Chain? If so, how does it differ from the above?
Thanks!
Andrée