[quote]The problem is, that wherever trying to GetEntry from fChainMC it crashes… I LoadTree(0) before trying to GetEntry, but still cannot find a solution… [/quote]Their could be many reasons, none of which is obvious you the code snippet you provided . To narrow the scope, can you re-run your example with valgrind and also provide the stack trace at the time of the crash.
*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib64/tls/libthread_db.so.1”.
Attaching to program: /proc/11820/exe, process 11820
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread 4125537984 (LWP 11820)]
0xffffe410 in __kernel_vsyscall () #1 0x00abdd23 in __waitpid_nocancel () from /lib/tls/libc.so.6 #2 0x00a677a9 in do_system () from /lib/tls/libc.so.6 #3 0x00c6498d in system () from /lib/tls/libpthread.so.0 #4 0xf7af1d4d in TUnixSystem::Exec ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libCore.so #5 0xf7af83d0 in TUnixSystem::StackTrace ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libCore.so #6 0xf7af4959 in TUnixSystem::DispatchSignals ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libCore.so #7 0xf7af4a03 in SigHandler ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libCore.so #8 0xf7af3aae in sighandler ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libCore.so #9 #10 0xf6917fdf in TBranch::GetEntry ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libTree.so #11 0xf691daaf in TBranchElement::GetEntry ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libTree.so #12 0xf691da3b in TBranchElement::GetEntry ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libTree.so #13 0xf69613dc in TTree::GetEntry ()
from /grid_mnt/swmgrs/cmss/slc4_ia32_gcc345/cms/cmssw/CMSSW_2_2_13/external/slc4_ia32_gcc345/lib/libTree.so #14 0xf608dac9 in DelphesTreeProducer::FillEntry ()
from /user/alkaloge/lib/libMadGraphTreeProducer.so #15 0xf608d8e3 in DelphesTreeProducer::Loop ()
from /user/alkaloge/lib/libMadGraphTreeProducer.so #16 0x080496b4 in main ()
Also forgot to tell, that my code compiles fine–the crash is during running