Storing Pointers to TBranch in a vector

Hello All,

I have a TTree with many branches contains std:vector. I would
like to access a specific subset of these Branches. A way I thought of
doing this would fill a vector with a pointers to the branches I want
and fill another vector with pointers to the vectors in the Branches. This
part I can achieve just fine but when I try to load an entry from the tree
I get a crash with the below output.

I have attached files which reproduce the crash.

Any help is appreciated.

#5 0x00002acbd2d2cea4 in TBufferFile::ReadFastArray(float*, int) ()
from /afs/
#6 0x00002acbd2d6846f in void TGenCollectionStreamer::ReadBufferVectorPrimitives(TBuffer&, void*) ()
from /afs/
#7 0x00002acbd2d326d5 in TBufferFile::ReadFastArray(void*, TClass const*, int, TMemberStreamer*, TClass const*) ()
from /afs/
#8 0x00002acbd2d80b2e in int TStreamerInfoActions::ReadSTL<&(TStreamerInfoActions::ReadSTLMemberWiseSameClass(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*, short)), &(TStreamerInfoActions::ReadSTLObjectWiseFastArray(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*, short, unsigned int))>(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) ()
from /afs/
#9 0x00002acbd2d2d2ad in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) ()
from /afs/
#10 0x00002acbd45921f1 in TBranchElement::ReadLeavesMember(TBuffer&) ()
from /afs/
#11 0x00002acbd4583a36 in TBranch::GetEntry(long long, int) ()
from /afs/
#12 0x00002acbd458c7a6 in TBranchElement::GetEntry(long long, int) ()
from /afs/
#13 0x00002acbd45da880 in TTree::GetEntry(long long, int) ()
from /afs/
#14 0x000000000040209b in LoadEvent (this=0x43bc340) at
#15 tester::test::Run (this=0x43bc340) at
#16 0x0000000000402255 in main (argc=,
argv=) at
test.tar.gz (12.7 KB)

愛情萬歲 (3.68 KB)

Thanks for the help.