ERROR while trying to read a tree to RooDataSet

Hello,

When I was trying to read a tree using the code attached, the following information appeared. I don’t know what is wrong with it. Could anyone please help me? Thank you.

Cheers,
Fangzhou
*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib/tls/libthread_db.so.1”.
Attaching to program: /proc/24416/exe, process 24416
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread -151247168 (LWP 24416)]
(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.
0x009c67a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x065c9d23 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2 0x065737a9 in do_system () from /lib/tls/libc.so.6
#3 0x0099698d in system () from /lib/tls/libpthread.so.0
#4 0x002e2d67 in TUnixSystem::Exec () from /home/liuk/Utilities/root/lib/libCore.so
#5 0x002e87f8 in TUnixSystem::StackTrace () from /home/liuk/Utilities/root/lib/libCore.so
#6 0x002e5436 in TUnixSystem::DispatchSignals () from /home/liuk/Utilities/root/lib/libCore.so
#7 0x002e54c4 in SigHandler () from /home/liuk/Utilities/root/lib/libCore.so
#8 0x002e4709 in sighandler () from /home/liuk/Utilities/root/lib/libCore.so
#9
#10 0x01a43252 in RooTreeData::loadValues () from /home/liuk/Utilities/root/lib/libRooFitCore.so
#11 0x01a43cb4 in RooTreeData::RooTreeData$base ()
from /home/liuk/Utilities/root/lib/libRooFitCore.so
#12 0x019923cd in RooDataSet::RooDataSet () from /home/liuk/Utilities/root/lib/libRooFitCore.so
#13 0x01a96129 in G__G__RooFitCore1_177_0_7 () from /home/liuk/Utilities/root/lib/libRooFitCore.so
#14 0x00a1a41b in Cint::G__ExceptionWrapper () from /home/liuk/Utilities/root/lib/libCint.so
#15 0x00aae5b0 in G__execute_call () from /home/liuk/Utilities/root/lib/libCint.so
#16 0x00aae8c2 in G__call_cppfunc () from /home/liuk/Utilities/root/lib/libCint.so
#17 0x00a90077 in G__interpret_func () from /home/liuk/Utilities/root/lib/libCint.so
#18 0x00a7ec28 in G__getfunction () from /home/liuk/Utilities/root/lib/libCint.so
#19 0x00a57127 in G__define_var () from /home/liuk/Utilities/root/lib/libCint.so
#20 0x00ad9bcc in G__exec_statement () from /home/liuk/Utilities/root/lib/libCint.so
#21 0x00a91b9f in G__interpret_func () from /home/liuk/Utilities/root/lib/libCint.so
#22 0x00a7ea6a in G__getfunction () from /home/liuk/Utilities/root/lib/libCint.so
#23 0x00a62f70 in G__getitem () from /home/liuk/Utilities/root/lib/libCint.so
#24 0x00a65bbb in G__getexpr () from /home/liuk/Utilities/root/lib/libCint.so
#25 0x00a6eed0 in G__calc_internal () from /home/liuk/Utilities/root/lib/libCint.so
#26 0x00aec1b0 in G__process_cmd () from /home/liuk/Utilities/root/lib/libCint.so
#27 0x002d218b in TCint::ProcessLine () from /home/liuk/Utilities/root/lib/libCore.so
#28 0x002d230c in TCint::ProcessLineSynch () from /home/liuk/Utilities/root/lib/libCore.so
#29 0x00218aba in TApplication::ExecuteFile () from /home/liuk/Utilities/root/lib/libCore.so
#30 0x00218e46 in TApplication::ProcessFile () from /home/liuk/Utilities/root/lib/libCore.so
#31 0x00216d46 in TApplication::ProcessLine () from /home/liuk/Utilities/root/lib/libCore.so
#32 0x0086aec2 in TRint::HandleTermInput () from /home/liuk/Utilities/root/lib/libRint.so
#33 0x00869518 in TTermInputHandler::Notify () from /home/liuk/Utilities/root/lib/libRint.so
#34 0x0086b7b6 in TTermInputHandler::ReadNotify () from /home/liuk/Utilities/root/lib/libRint.so
#35 0x002e16f2 in TUnixSystem::CheckDescriptors () from /home/liuk/Utilities/root/lib/libCore.so
#36 0x002e5914 in TUnixSystem::DispatchOneEvent () from /home/liuk/Utilities/root/lib/libCore.so
#37 0x0026efb8 in TSystem::InnerLoop () from /home/liuk/Utilities/root/lib/libCore.so
#38 0x0026ed7f in TSystem::Run () from /home/liuk/Utilities/root/lib/libCore.so
#39 0x00216f96 in TApplication::Run () from /home/liuk/Utilities/root/lib/libCore.so
#40 0x00869c96 in TRint::Run () from /home/liuk/Utilities/root/lib/libRint.so
#41 0x08048d46 in main ()
Root > Function Onsel_MCMU() busy flag cleared
Onsel_MCMU.C (420 Bytes)

Hi,

If you send me the file I can debug this.

Wouter

Hi,

I’m sorry but I don’t know how to send this large file (approximately 800MB)

Fangzhou

I think you can prepare a file which is as small as possible but can reproduce the problem. If it really depends on the file size, maybe you can put it in some public area of lxplus so that Wounter could debug your problem.:slight_smile:

I hope this will help debug the code. Thank you

Cheers,
Fangzhou
Full_GLBJP.C (378 Bytes)
small.root (49 KB)

Thanks,

I will have a look shortly (but after tomorrow)

Wouter

Hi,

The TTree branch that you’re trying to associate to the RooRealVar of the RooDataSet turns out to be an array of doubles, which cannot be represented by a RooRealVar as it can only present a single ‘Double_t’. Unfortunately the correct error handling was broken.
I have fixed this now so that in the future (ROOT 5.22) an error message will be printed and the crash will be avoided.

The solution to your problem is that you need to perform some manual step on the TTree level to reduce your array of doubles to a single double. This is a conceptual step that is specific to your analysis.

Wouter