<TTree::SetBranchStatus>: unknown branch ->

I am doing a TChain on two different MonteCarlo simulations (2 trees), with different leaves’ names.

When I am dealing with an entry from (say) the first tree and it looks for a leaf that is actually in the second tree, it outputs an error message of this form:

Error in TTree::SetBranchStatus: unknown branch -> B_s0_TRUEID

Although the programme compiles and runs anyway, the terminal is full of such error messages and I can’t track down any other messages… Is there a way of fixing it?

Hi,

what is the constraint that forces you building such a chain? Why not looping over files and trees and set the appropriate branch names?