Hadd not working when missing branches in one of the root files

Hi,

I am trying to merge 3 root files (file1, file2, file3). I have some branches in file1 that are missing in file2 and file3. I first used hadd -f but root complains with this warning and resulting merged files is missing entries from file 2 and file 3

Warning in TTree::CopyEntries: One of the export top level branches (trigPassed_HLT_mu20_iloose_L1MU15) is not present in the import TTree.

is it possible to overcome this issue, without having to use TChain?

best,
Yassine

Hi,

Thank you for your post!
@pcanal could you please have a look?

There is this PR that might solve it: [TTree] Enable merging all the branches from all the files by ferdymercury · Pull Request #17650 · root-project/root · GitHub