Thanks @moneta
It looks to me as well that it is a memory problem, because I tested for the small entries. If I have 29889232 (~30Million) entries in the dataset.
If I use all of them I get this error.
terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc
But if I use fewer entries (~200k counts) then I get the following crash.
Error in RooFormula::Compile: Bad numerical expression : “massCat”
[#0] ERROR:InputArguments – RooFormula::RooFormula(massCat==massCat::SB1): compile error
[#0] ERROR:InputArguments – RooDataSet::data:fillHistogram: invalid cuts “massCat==massCat::SB1”
[#0] ERROR:Plotting – RooDataSet::data:plotOn: fillHistogram() failed
*** Break *** segmentation violation
Generating stack trace…
0x00002adbc0871778 in RooPlot::getAttLine(char const*) const at /memfs/15572288/root-6.16.00/roofit/roofitcore/src/RooPlot.cxx:735 from /net/software/local/root/6.16.00/lib/libRooFitCore.so
0x00002adbc0734bf2 in RooAbsData::plotOn(RooPlot*, RooLinkedList const&) const at /memfs/15572288/root-6.16.00/roofit/roofitcore/src/RooAbsData.cxx:1697 from /net/software/local/root/6.16.00/lib/libRooFitCore.so
0x00002adbc0734275 in RooAbsData::plotOn(RooPlot*, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&, RooCmdArg const&) const at /memfs/15572288/root-6.16.00/roofit/roofitcore/src/RooAbsData.cxx:540 from /net/software/local/root/6.16.00/lib/libRooFitCore.so
0x00002adbadbed922 in
0x00002adbadbeb066 in
0x00002adbb404e53d in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) + 0x4ed from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb404d927 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0xd7 from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb41a2b43 in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) + 0xbb3 from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb41b57ae in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) + 0x1de from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb41b5174 in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) + 0x64 from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb41b4f19 in cling::MetaParser::isMetaCommand(cling::MetaSema::ActionResult&, cling::Value*) + 0x29 from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb41a0d59 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0xe9 from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb3f9be4c in from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb3fa1366 in from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbb3fa026e in from /net/software/local/root/6.16.00/lib/libCling.so
0x00002adbae288470 in TApplication::ExecuteFile(char const*, int*, bool) at /memfs/15572288/root-6.16.00/core/base/src/TApplication.cxx:1167 from /net/software/local/root/6.16.00/lib/libCore.so
0x00002adbae28625e in TApplication::ProcessLine(char const*, bool, int*) at /memfs/15572288/root-6.16.00/core/base/src/TApplication.cxx:1012 from /net/software/local/root/6.16.00/lib/libCore.so
0x00002adbaddfcbef in TRint::ProcessLineNr(char const*, char const*, int*) at /memfs/15572288/root-6.16.00/core/rint/src/TRint.cxx:761 from /net/software/local/root/6.16.00/lib/libRint.so
0x00002adbaddfc900 in TRint::Run(bool) at /memfs/15572288/root-6.16.00/core/rint/src/TRint.cxx:421 from /net/software/local/root/6.16.00/lib/libRint.so
0x0000000000402d54 in from /net/software/local/root/6.16.00/bin/root.exe
0x00002adbaf04a505 in __libc_start_main + 0xf5 from /lib64/libc.so.6
0x0000000000402be9 in from /net/software/local/root/6.16.00/bin/root.exe
Here I attached the same macro with the test file (hope it work for you).
Out.root (1.4 MB) testError.C (1.6 KB)
And please suggest something so that this macro can work for 30M entries where it gives the memory error?
Thanks