Hi H.-Gerd,
It is likely that you are using split mode > 0 for this branch.
In more recent versions, I forbid collections to be split
(except TClonesArray). You can check if this branch is split
by doing a tree.Print()
Let me know
Rene Brun
On Mon, 3
Mar 2003, H.-Gerd Rosarius wrote:
> Hello Rooters,
>
> I have some problems reading a TMap-Object from a root file and
> could need some hints and help.
>
> Using some code like shown below results in a segmentation
> violation and I can't get why.
>
> TMap* map = new TMap();
> TBranch* branch = readtree->GetBranch("mybranch");
> branch->SetAddress(&map);
>
> Int_t entries = (Int_t) readtree->GetEntries();
>
> for (Int_t i = 0; i < entries; i++) {
> branch->GetEntry(i);
> }
>
> The branch "mybranch" really exists, holds objects of type TMap
> and does not hold a null-pointer after the call GetBranch().
> The segmentation violation occures at the GetEntry() method.
>
> It's weird somehow, because a simple readtree->Show()
> results also in a segmentation violation if the show-method
> arrives at branches which hold TMap-objects.
>
> I'm using Root 3.03/09 build from source with g++ 3.0.4 on a
> Debian Linux box.
>
> Thanks for any help.
>
> H.-Gerd Rosarius
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET