Tchain with friends

I would like to do this

  TChain *chainele = new TChain("my_tree_name");

  TFile * f = new TFile("file1.root","file1.root");

  f = new TFile("file2.root","file2.root");

But this doesn’t work. When I try to access a variable in the friend tree, it only works for file1.root.

Is there anyway to make a TChain which has friends?

I found one way to do it. Make another chain for the friend tree and add the files in the same order. Then make that chain a friend of the first one.