Code running for a long time

Hi Experts,

I have a written a code to create a new tree and fill it. But when I run this code it is taking a long time( 18 hours). Please have a look. I am not sure if I am doing some thing wrong.Thank you

Anirvan
trial_flat.C (14.9 KB)

One more piece of information if I run this code using AClic, then it crashes. So for example if I do in a root session some thing like

$ root -l trial_flat.C+

I get

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x00002b46ce770144 in ROOT::TCollectionProxyInfo::Pushback<std::vector<float, std::allocator > >::resize(void*, unsigned long) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libvectorDict.so
#6 0x00002b46c8ff1651 in void TGenCollectionStreamer::ReadBufferVectorPrimitives(TBuffer&, void*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#7 0x00002b46c8fc7825 in TBufferFile::ReadFastArray(void*, TClass const*, int, TMemberStreamer*, TClass const*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#8 0x00002b46c9005a9e 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.28.00c/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#9 0x00002b46c8fc249d in TBufferFile::ReadSequence(TStreamerInfoActions::TActionSequence const&, void*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libRIO.so
#10 0x00002b46c9958cc1 in TBranchElement::ReadLeavesMember(TBuffer&) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#11 0x00002b46c99507f5 in TBranch::GetEntry(long long, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#12 0x00002b46c9956d67 in TBranchElement::GetEntry(long long, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#13 0x00002b46c999dc90 in TTree::GetEntry(long long, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00c/x86_64-slc5-gcc43-opt/root/lib/libTree.so
#14 0x00002b46ce9932d2 in trial_flat() ()
from /tmp/asircar/Analysis/./trial_flat_C.so

Hi,

You must initialize any pointers: vector<int> *tau_numTrack; should read vector<int> *tau_numTrack = 0;

Cheers,
Philippe.