Root error in getting events

Hello all,
I am having some troubles in my code to read the entries from a tree, I have run the same code before, but for some reason, it is failing now. Below is the crash log -

#6 0x00007efe511808eb in int TStreamerInfoActions::VectorLooper::ReadCollectionBasicType<float>(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.55/InstallArea/x86_64-slc6-gcc62-opt/lib/libRIO.so

#7 0x00007efe5108b295 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.55/InstallArea/x86_64-slc6-gcc62-opt/lib/libRIO.so

#8 0x00007efe51af6d2d in TBranchElement::ReadLeavesMember(TBuffer&) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.55/InstallArea/x86_64-slc6-gcc62-opt/lib/libTree.so

#9 0x00007efe51ae9d1a in TBranch::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.55/InstallArea/x86_64-slc6-gcc62-opt/lib/libTree.so

#10 0x00007efe51b02041 in TBranchElement::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.55/InstallArea/x86_64-slc6-gcc62-opt/lib/libTree.so

#11 0x00007efe51b467a1 in TTree::GetEntry(long long, int) () from /cvmfs/atlas.cern.ch/repo/sw/software/21.2/AnalysisBaseExternals/21.2.55/InstallArea/x86_64-slc6-gcc62-opt/lib/libTree.so

#12 0x00007efe5265469c in SkimSlim::Loop (this=0x33cc730) at /afs/cern.ch/user/s/ssaha/ssaha/skimming-code/HaaSkimming/Root/SkimSlim.cxx:544

#13 0x0000000000408cc7 in processOutput (tree=tree

entry=0xd6b290, outputfile=outputfile

entry=0xfd16f0, newTreeName=<incomplete type>, isData=isData

entry=false, isNominal=isNominal

entry=true, myConfig=..., SOW=..., histmap=..., histmap1=..., isSignal=false, lumi=lumi

entry=36000, CBKMap=...) at /afs/cern.ch/user/s/ssaha/ssaha/skimming-code/HaaSkimming/utils/MySkimSlim.cxx:266

#14 0x0000000000404b75 in main (argc=<optimized out>, argv=<optimized out>) at /afs/cern.ch/user/s/ssaha/ssaha/skimming-code/HaaSkimming/utils/MySkimSlim.cxx:411

This is the line (bold) in the code, after which the code crashes -

   for (Long64_t jentry=0; jentry<nentries;jentry++) {
      Long64_t ientry = LoadTree(jentry);
      if (ientry < 0) break;
      **nb = fChain->GetEntry(jentry);   nbytes += nb;**
      if(jentry%10000 == 0){
        cout << jentry <<"\r";
        flush(cout);
      }

It appears that the memory used to read the branch into is not ‘appropriate/sufficient’ for the content.
Double check that the memory passed to SetBranchAddress is large enough.

Cheers,
Philippe.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.