Hi Alexander,
I have found (and corrected) a problem in TChain::Merge in case
your Root file contains TNtuple objects (instead of TTrees).
If this is not the case, please send me a small file1.root file.
> Another thing occurs when while reading (not merging) the above chain.
> Changing the line
> chain->SetBranchAddress("event",&event);
> in the event reading program
> (see http://wwwinfo.cern.ch/~tkatchea/testchain.cxx )
> into the following sequence:
> chain->GetListOfBranches();
> TBranch* branch = chain->GetBranch("event");
> branch->SetAddress(&event);
> causes a core dump. In case of my own private tree there were no core
> dump but incorrect number of entries in my hisograms instead. Unfortunately
> I was unable to produce this error for "event" example. Also, function
> TChain::GetListOfBranches() must executed before
> TChain::GetBranch(const Text_t *name) {return fTree->GetBranch(name);}
> because fTree is otherwise a NULL pointer.
> As a workaround of all that I have to build my own TObjArray of filenames
> and open/close files by hand.
>
> Cheers, Alexander Tkatchev.
This is likely connected with the problem above and should be fixed
in my version.
I recommend to use the form
tree->SetBranchAddress
or
chain->SetBranchAddress
instead of
branch->SetAddress
Rene Brun