Hello,
I am writing a small cpp function to define an additional variable that is not stored in the TTrees I am reading.
I got it working just fine with up to 9 arguments to the cpp function but when I tried to add a 10th one, I hit a segmentation fault (see log below).
So I have a few questions:
- Is there a hard limit on the number of variables I can pass? If yes, where is it documented?
- What type of object can I pass to my function? In the past I know that only standard types (int, float, etc) were supported but maybe there is more options now?
Thanks a lot!
Cheers,
Quentin
Blockquote
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[] (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] TryImplicitConversion(clang::Sema&, clang::Expr*, clang::QualType, bool, bool, bool, bool, bool, bool) (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] TryCopyInitialization(clang::Sema&, clang::Expr*, clang::QualType, bool, bool, bool, bool) (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] clang::Sema::AddOverloadCandidate(clang::FunctionDecl*, clang::DeclAccessPair, llvm::ArrayRef< clang::Expr*>, clang::OverloadCandidateSet&, bool, bool, bool, llvm::MutableArrayRef<clang:: ImplicitConversionSequence>) (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] cling::overloadFunctionSelector(clang::DeclContext*, bool, llvm::SmallVectorImpl<clang:: Expr*> const&, clang::LookupResult&, clang::DeclarationNameInfo&, clang::TemplateArgumentListInfo const*, clang::ASTContext&, clang::Parser&, clang::Sema&, cling::LookupHelper::DiagSetting) (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] clang::FunctionDecl const* cling::findFunction<clang::FunctionDecl const*>(clang::DeclContext*, llvm::StringRef, llvm::SmallVectorImplclang::Expr* const&, bool, clang::ASTContext&, cling::Interpreter*, clang::FunctionDecl const* ()(clang::DeclContext, bool, llvm::SmallVectorImpl<clang:: Expr*> const&, clang::LookupResult&, clang::DeclarationNameInfo&, clang::TemplateArgumentListInfo const*, clang::ASTContext&, clang::Parser&, clang::Sema&, cling::LookupHelper::DiagSetting), cling::LookupHelper::DiagSetting) (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] clang::FunctionDecl const* cling::execFindFunction<cling::ExprFromTypes, clang::FunctionDecl const*>(clang::Parser&, cling::Interpreter*, cling::LookupHelper&, clang::Decl const*, llvm::StringRef, cling::ExprFromTypes::ArgsInput const&, bool, clang::FunctionDecl const* ()(clang::DeclContext, bool, llvm::SmallVectorImpl<clang:: Expr*> const&, clang::LookupResult&, clang::DeclarationNameInfo&, clang::TemplateArgumentListInfo const*, clang::ASTContext&, clang::Parser&, clang::Sema&, cling::LookupHelper::DiagSetting), cling::LookupHelper::DiagSetting) (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] cling::LookupHelper::findFunctionProto(clang::Decl const*, llvm::StringRef, llvm::SmallVectorImpl<clang:: QualType> const&, cling::LookupHelper::DiagSetting, bool) const (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] TClingClassInfo::GetMethod(char const*, llvm::SmallVectorImpl<clang:: QualType> const&, bool, long*, ROOT::EFunctionMatchMode, TClingClassInfo::EInheritanceMode) const (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] TClingCallFunc::SetFuncProto(TClingClassInfo const*, char const*, llvm::SmallVectorImpl<clang:: QualType> const&, bool, long*, ROOT::EFunctionMatchMode) (no debug info)
[/Applications/root_v6.16.00/lib/libCling.so] TCling::CallFunc_SetFuncProto(CallFunc_t*, ClassInfo_t*, char const*, std::__1::vector<TypeInfo_t*, std::__1::allocator<TypeInfo_t*> > const&, bool, long*, ROOT::EFunctionMatchMode) const (no debug info)
[/Applications/root_v6.16.00/lib/libHist.6.16.00.so] ROOT::v5::TFormula::AnalyzeFunction(TString&, int&, int) (no debug info)
[/Applications/root_v6.16.00/lib/libHist.6.16.00.so] ROOT::v5::TFormula::Analyze(char const*, int&, int) (no debug info)
[/Applications/root_v6.16.00/lib/libHist.6.16.00.so] ROOT::v5::TFormula::Compile(char const*) (no debug info)
[/Applications/root_v6.16.00/lib/libTreePlayer.6.16.00.so] TTreeFormula::Init(char const*, char const*) (no debug info)
[/Applications/root_v6.16.00/lib/libTreePlayer.6.16.00.so] TTreeFormula::TTreeFormula(char const*, char const*, TTree*) (no debug info)
[/Users/quentin/software/HAPPy/ROOT/MultiHistogramFill_cxx.so] MultiHistogramFill::addTTreeFormula(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) (no debug info)
[/Users/quentin/software/HAPPy/ROOT/MultiHistogramFill_cxx.so] MultiHistogramFill::fill(long long const&) (no debug info)
[] (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] FastCall(long, void*, void*, void*) (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] Cppyy::CallB(long, void*, void*) (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] PyROOT::TBoolExecutor::Execute(long, void*, PyROOT::TCallContext*) (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] PyROOT::TMethodHolder::CallFast(void*, long, PyROOT::TCallContext*) (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] PyROOT::TMethodHolder::CallSafe(void*, long, PyROOT::TCallContext*) (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] PyROOT::TMethodHolder::Execute(void*, long, PyROOT::TCallContext*) (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] PyROOT::TMethodHolder::Call(PyROOT::ObjectProxy*&, _object*, _object*, PyROOT::TCallContext*) (no debug info)
[/Applications/root_v6.16.00/lib/libPyROOT.so] PyROOT::(anonymous namespace)::mp_call(PyROOT::MethodProxy*, _object*, _object*) (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_Call (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_Call (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_Call (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_Call (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_Call (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCode (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyRun_FileExFlags (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyRun_SimpleFileExFlags (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] Py_Main (no debug info)
ROOT Version: v6.16.00
Platform: MacOS.10.14.3
Compiler: clang