I have been using TTree in a simple way with basic types in all branches. Using the method TTree:AddFriend is obvious here. Now I need to store user-defined classes, similar to the Event class (your example), including TClonesArray of some sub-classes. I have the tree created, everything works OK.
Let’s assume, that someone else wants to create new branches to this tree. He can not, because it’s read-only. So he want’s to create a friend tree. How to define the structure, if the branch should contain new information on each track (referring to the Event example)?
What is probably possible, is to load the complete entry to the class in the original tree and save it in a new tree using an extended class (including the new information). Or is there any other way to do it using AddFriend method? Could one use another class in the friend tree representing the same structure (tracks etc)? Is there some example showing how to use AddFriend with classes?