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.
gmake
./test

Any help is appreciated.

#5 0x00002acbd2d2cea4 in TBufferFile::ReadFastArray(float*, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#6 0x00002acbd2d6846f in void TGenCollectionStreamer::ReadBufferVectorPrimitives(TBuffer&, void*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#7 0x00002acbd2d326d5 in TBufferFile::ReadFastArray(void*, TClass const*, int, TMemberStreamer*, TClass const*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#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/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#9 0x00002acbd2d2d2ad in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#10 0x00002acbd45921f1 in TBranchElement::ReadLeavesMember(TBuffer&) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#11 0x00002acbd4583a36 in TBranch::GetEntry(long long, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#12 0x00002acbd458c7a6 in TBranchElement::GetEntry(long long, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#13 0x00002acbd45da880 in TTree::GetEntry(long long, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#14 0x000000000040209b in LoadEvent (this=0x43bc340) at test.cc:21
#15 tester::test::Run (this=0x43bc340) at test.cc:68
#16 0x0000000000402255 in main (argc=,
argv=) at test.cc:86
test.tar.gz (12.7 KB)

愛情萬歲
test.cc.txt (3.68 KB)

Thanks for the help.