Problem with addfriend on 64 bit

I have two root files that I would like to friend. They have the same number of entries. The code that fails is below. I am using root version 5.30.00 compiled on a 64 bit RHEL6 machine.

I have tried the following substitutions in the code below but all seg fault:
[ul]
building an index in both root files
t_test->AddFriend(“test2”,“test2.root”)
test->AddFriend(“test2”,“test2.root”)
t_test->FindBranch(“test2.reg_asym_qwk_mdallbars”)->Print()
t_test->FindBranch(“t_test2.reg_asym_qwk_mdallbars”)->Print()
and, I believe, all the permutations of the above
[/ul]


TFile *f_test = new TFile("test.root");
TTree *t_test = (TTree*)f_test->Get("test");
TFile *f_test2 = new TFile("test2.root");
TTree *t_test2 = (TTree*)f_test2->Get("test2");

t_test2->FindBranch("reg_asym_qwk_mdallbars")->Print(); // succeeds
t_test->AddFriend(t_test2); // no warnings displayed
t_test->FindBranch("reg_asym_qwk_mdallbars")->Print(); // seg faults

The above code works with root-5.30.00 on ubuntu 11.04 32 bit.
test2.root (61.7 KB)
test.root (64.9 KB)

Hi,

The problem stems from the fact that the TTree in test2 has a branch without any name:*Br 66 :reg_asym_qwk_md9pos : reg_asym_qwk_md9pos/D * *Entries : 99 : Total Size= 1416 bytes File Size = 878 * *Baskets : 1 : Basket Size= 513024 bytes Compression= 1.00 * *............................................................................* *Br 67 : : /D * *Entries : 99 : Total Size= 1339 bytes File Size = 101 * *Baskets : 1 : Basket Size= 512512 bytes Compression= 8.50 * *............................................................................*The code has been upgraded to avoid crashing in this case. However your best course of action is to update code writing test2.root so that it does created an unamed (and thus very hard to use) branch.

Cheers,
Philippe.