Re: 'Unknown branch' error

Pasha Murat (murat@cdfsga.fnal.gov)
Sun, 21 Jun 1998 13:33:45 -0500 (CDT)


Laurent Aphecetche writes:
> Is it possible to intercept the 'Unknown branch' that one could get when
> doing a TChain::SetBranchAddress on a branch that does not exist
> (anymore) in a TTree ?

Hi Laurent, the following check:

if (chain->GetBranch(branch_name)) {
chain->SetBranchAddress(branch_name,address);
}

seems to be pretty much equivalent to intercepting the "bad" return.

Regards, Pasha.