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

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 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/
#6 0x00002b46c8ff1651 in void TGenCollectionStreamer::ReadBufferVectorPrimitives(TBuffer&, void*) ()
from /afs/
#7 0x00002b46c8fc7825 in TBufferFile::ReadFastArray(void*, TClass const*, int, TMemberStreamer*, TClass const*) ()
from /afs/
#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/
#9 0x00002b46c8fc249d in TBufferFile::ReadSequence(TStreamerInfoActions::TActionSequence const&, void*) ()
from /afs/
#10 0x00002b46c9958cc1 in TBranchElement::ReadLeavesMember(TBuffer&) ()
from /afs/
#11 0x00002b46c99507f5 in TBranch::GetEntry(long long, int) ()
from /afs/
#12 0x00002b46c9956d67 in TBranchElement::GetEntry(long long, int) ()
from /afs/
#13 0x00002b46c999dc90 in TTree::GetEntry(long long, int) ()
from /afs/
#14 0x00002b46ce9932d2 in trial_flat() ()
from /tmp/asircar/Analysis/./


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