Using AddFriend for two TChains?

Hi,

I am trying to merge two TChains, using AddFriend,
but the content of the Chain from AddFriend is empty, for some reason?
My code is below. Can anyone please help me?

Thanks, Peter (root v4.00)

// First TChain:
TChain* chainSi = new TChain(“TELTracks”);
chainSi->Add(TELfil1);
chainSi->Add(TELfil2);

// Second TChain:
TChain* chainOT = new TChain(“MyTree”);
chainOT->Add(OTfil1);
chainOT->Add(OTfil2);

// First Clone the first Chain, then Add the other:
TTree* mergedTree = chainSi->CloneTree();
mergedTree->AddFriend(chainOT) ;

( PS. I also tried:
mergedTree->AddFriend(“MyTree”,OTfil1);
but then only the FIRST TTree is added, not the whole TChain… )

but the content of the Chain from AddFriend is empty, for some reason?

What do you mean it is empty? How do you assert this?

Philippe.