Working with trees and object I/O I found the following. Running the
"event" example from $ROOTSYS/test I produced several "Event.root" files
and called them "file1.root", "file2.root" etc. I tried to merge these ROOT
files and got the following:
root [0] .x eventload.cxx
root [1] TChain chain("T");
root [2] chain.Add("file1.root");
root [3] chain.Add("file2.root");
root [4] chain.Merge("newfile.root");
*** Break *** bus error
Is it the same problem as in TTree::CloneTree() that was mentioned recently?
If this problem is well known than sorry for that...
Version of ROOT used is 2.00.11 for HP-UX aCC1.09.
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.