Chain of TTree with TBranches can't be read... help

I have a lfew TTree’s that are chained together. I declare my Structures in the beginning of my code as such:

struct Branch1 {
Float_t leaf1, leaf2, leaf3, leaf4;
} branch1;

struct Branch2 {
Float_t leaf1a, leaf2a, leaf3a, leaf4a;
} branch2;

I then use the lines (Straight from the ROOT Manual):

chain[0]->SetBranchStatus(“branch1”, 1);
chain[0]->SetBranchStatus(“branch2”, 1);

TBranch* br1 = chain[0]->GetBranch(“branch1”);
TBranch* br2 = chain[0]->GetBranch(“branch2”);

br1->SetAddress(&branch1);
br2->SetAddress(&branch2);

br1->SetAutoDelete(kTRUE);
br2->SetAutoDelete(kTRUE);

Now, when I try and read my chain, i.e. “chain[0]->GetEntry(1)” , It is completely empty! All my variables are equal to zero, i.e. branch1.leaf1 = 0 and branch2.leaf2a = 0 .

What is wrong?

Eugene

See an example close to what you try to do in $ROOTSYS/tutorials/tree2.C

Rene