Hi, my plan is to add a number of branches from one tree to another.
I can do this quite laboriously by updating the file with the new branches written.
However, the AddFriend method seems to be preferable. Would it be possible to use this in conjunction with the MakeSelector class, i.e. to condition entries in the file dependent on the added branches? If so a few lines of code as an example would be great.
The MakeSelector generates code only for one Tree, not for its friend. However, you can call MakeSelector for each Tree and in the code generated for your main Tree declare friend a Tree with the code generated in another file.
Hi Rene,
Could you specify more how to do this with MakeSelector? I manage to do this with MakeClass, generating classes for both trees and then I followed some prescriptions on this forum (without making them friends). But in class generated with MakeSelector where should I make the other tree a friend?
Cheers,
Janusz
In the MakeSelector you should call the 2nd selector’s Init method from the first selector Init. You should setup the 2nd selector either in the constructor or in the SlaveBegin of the first selector.