No Matching Function Call to Exec

Hi all,

I am writing a program that should read a set of histograms and cuts from a configuration file and then plot them using RDataFrames. When I try to write the histograms to a file (in the CalcPrediction function at line 119), ROOT complains about a non-matching call to Exec:

% ./DataFramePrediction -o blork -c cutstrings_ttbar.cfg  moep.root
 
In file included from /mnt/build/jenkins/workspace/lcg_release_tar/BUILDTYPE/Release/COMPILER/gcc62binutils/LABEL/slc6/build/projects/ROOT-6.14.04/src/ROOT-6.14.04-build/input_line_12:21:
In file included from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../etc/dictpch/allHeaders.h:688:
In file included from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/TTreeAsFlatMatrix.h:17:
In file included from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDataFrame.hxx:26:
In file included from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFInterface.hxx:32:
In file included from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/include/ROOT/RDFInterfaceUtils.hxx:18:
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFNodes.hxx:401:15: error: no matching member function for call to 'Exec'
      fHelper.Exec(slot, std::get<S>(fValues[slot]).Get(entry)...);
      ~~~~~~~~^~~~
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFNodes.hxx:394:10: note: in instantiation of function template specialization 'ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter, ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>,
      int, float> >::Exec<0, 1, 2>' requested here
         Exec(slot, entry, TypeInd_t());
         ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFNodes.hxx:371:4: note: in instantiation of member function 'ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter, ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float>
      >::Run' requested here
   RAction(Helper &&h, const ColumnNames_t &bl, PrevDataFrame &pd)
   ^
/cvmfs/sft.cern.ch/lcg/releases/gcc/6.2.0-2bc78/x86_64-slc6-gcc62-opt/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/ext/new_allocator.h:120:23: note: in instantiation of member function 'ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter, ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float>
      >::RAction' requested here
        { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
                             ^
/cvmfs/sft.cern.ch/lcg/releases/gcc/6.2.0-2bc78/x86_64-slc6-gcc62-opt/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/bits/alloc_traits.h:455:8: note: in instantiation of function template specialization '__gnu_cxx::new_allocator<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> > >::construct<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> >, ROOT::Internal::RDF::FillTOHelper<TH2D>, const std::vector<std::__cxx11::basic_string<char>,
      std::allocator<std::__cxx11::basic_string<char> > > &, ROOT::Detail::RDF::RJittedFilter &>' requested here
        { __a.construct(__p, std::forward<_Args>(__args)...); }
              ^
/cvmfs/sft.cern.ch/lcg/releases/gcc/6.2.0-2bc78/x86_64-slc6-gcc62-opt/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/bits/shared_ptr_base.h:520:30: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> > > >::construct<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> >, ROOT::Internal::RDF::FillTOHelper<TH2D>, const std::vector<std::__cxx11::basic_string<char>,
      std::allocator<std::__cxx11::basic_string<char> > > &, ROOT::Detail::RDF::RJittedFilter &>' requested here
          allocator_traits<_Alloc>::construct(__a, _M_ptr(),
                                    ^
/cvmfs/sft.cern.ch/lcg/releases/gcc/6.2.0-2bc78/x86_64-slc6-gcc62-opt/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/bits/shared_ptr_base.h:615:18: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
          ::new (__mem) _Sp_cp_type(std::move(__a),
                        ^
/cvmfs/sft.cern.ch/lcg/releases/gcc/6.2.0-2bc78/x86_64-slc6-gcc62-opt/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/bits/shared_ptr.h:619:14: note: in instantiation of function template specialization 'std::shared_ptr<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> > >::shared_ptr<std::allocator<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> > >, ROOT::Internal::RDF::FillTOHelper<TH2D>, const std::vector<std::__cxx11::basic_string<char>,
      std::allocator<std::__cxx11::basic_string<char> > > &, ROOT::Detail::RDF::RJittedFilter &>' requested here
      return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a,
             ^
/cvmfs/sft.cern.ch/lcg/releases/gcc/6.2.0-2bc78/x86_64-slc6-gcc62-opt/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/bits/shared_ptr.h:635:19: note: in instantiation of function template specialization 'std::allocate_shared<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> >, std::allocator<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> > >, ROOT::Internal::RDF::FillTOHelper<TH2D>, const std::vector<std::__cxx11::basic_string<char>,
      std::allocator<std::__cxx11::basic_string<char> > > &, ROOT::Detail::RDF::RJittedFilter &>' requested here
      return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
                  ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/include/ROOT/RDFInterfaceUtils.hxx:124:23: note: in instantiation of function template specialization 'std::make_shared<ROOT::Internal::RDF::RAction<ROOT::Internal::RDF::FillTOHelper<TH2D>, ROOT::Detail::RDF::RJittedFilter,
      ROOT::TypeTraits::TypeList<ROOT::VecOps::RVec<float>, int, float> >, ROOT::Internal::RDF::FillTOHelper<TH2D>, const std::vector<std::__cxx11::basic_string<char>,
      std::allocator<std::__cxx11::basic_string<char> > > &, ROOT::Detail::RDF::RJittedFilter &>' requested here
   auto action = std::make_shared<Action_t>(Helper_t(h, nSlots), bl, prevNode);
                      ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/include/ROOT/RDFInterfaceUtils.hxx:333:7: note: in instantiation of function template specialization 'ROOT::Internal::RDF::BuildAndBook<ROOT::VecOps::RVec<float>, int, float, ROOT::Internal::RDF::ActionTypes::Histo2D, TH2D, ROOT::Detail::RDF::RJittedFilter>'
      requested here
      BuildAndBook<BranchTypes...>(bl, *rOnHeap, nSlots, loopManager, prevNode, (ActionType *)nullptr);
      ^
input_line_45:4:174: note: in instantiation of function template specialization 'ROOT::Internal::RDF::CallBuildAndBook<ROOT::Internal::RDF::ActionTypes::Histo2D, ROOT::VecOps::RVec<float>, int, float, ROOT::Detail::RDF::RJittedFilter,
      TH2D>' requested here
;}, {"MET"}, ":presel", reinterpret_cast<ROOT::Detail::RDF::RJittedFilter*>(0x226ee60), reinterpret_cast<ROOT::Detail::RDF::RJittedFilter*>(0x226a130));ROOT::Internal::RDF::CallBuildAndBook<ROOT::Interna...
                                                                                                                                                                             ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:255:9: note: candidate function not viable: no known conversion from 'ROOT::VecOps::RVec<float>' to 'double' for 2nd argument
   void Exec(unsigned int slot, double x0, double x1, double x2) // 2D weighted and 3D histos
        ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:293:9: note: candidate template ignored: requirement 'IsContainer<int>::value' was not satisfied [with X0 = ROOT::VecOps::RVec<float>, X1 = int, X2 = float]
   void Exec(unsigned int slot, const X0 &x0s, const X1 &x1s, const X2 &x2s)
        ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:266:9: note: candidate function template not viable: requires 2 arguments, but 4 were provided
   void Exec(unsigned int slot, const X0 &x0s)
        ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:276:9: note: candidate function template not viable: requires 3 arguments, but 4 were provided
   void Exec(unsigned int slot, const X0 &x0s, const X1 &x1s)
        ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:311:9: note: candidate function template not viable: requires 5 arguments, but 4 were provided
   void Exec(unsigned int slot, const X0 &x0s, const X1 &x1s, const X2 &x2s, const X3 &x3s)
        ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:250:9: note: candidate function not viable: requires 3 arguments, but 4 were provided
   void Exec(unsigned int slot, double x0, double x1) // 1D weighted and 2D histos
        ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:260:9: note: candidate function not viable: requires 5 arguments, but 4 were provided
   void Exec(unsigned int slot, double x0, double x1, double x2, double x3) // 3D weighted histos
        ^
/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.14.04-0d8dc/x86_64-slc6-gcc62-opt/etc/../include/ROOT/RDFActionHelpers.hxx:245:9: note: candidate function not viable: requires 2 arguments, but 4 were provided
   void Exec(unsigned int slot, double x0) // 1D histos
        ^

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
    import itertools
#0  0x0000003aee8ac89e in waitpid () from /lib64/libc.so.6
#1  0x0000003aee83e4e9 in do_system () from /lib64/libc.so.6
#2  0x00007f4fcebdfebd in TUnixSystem::StackTrace() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so
#3  0x00007f4fcebe2624 in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so
#4  <signal handler called>
#5  0x00007f4fc8272d34 in clang::CXXRecordDecl::getLambdaCallOperator() const () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#6  0x00007f4fc658f747 in clang::RecursiveASTVisitor<cling::(anonymous namespace)::StaticVarCollector>::TraverseLambdaExpr(clang::LambdaExpr*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*> > > >*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#7  0x00007f4fc67e59bb in clang::RecursiveASTVisitor<cling::(anonymous namespace)::StaticVarCollector>::TraverseStmt () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#8  0x00007f4fc67e68c1 in cling::DeclUnloader::VisitFunctionDecl(clang::FunctionDecl*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#9  0x00007f4fc67bc4b5 in cling::TransactionUnloader::unloadDeclarations(cling::Transaction*, cling::DeclUnloader&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#10 0x00007f4fc67bccf3 in cling::TransactionUnloader::RevertTransaction(cling::Transaction*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#11 0x00007f4fc67aa03e in cling::Interpreter::unload(cling::Transaction&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#12 0x00007f4fc680c8e9 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#13 0x00007f4fc680f47b in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#14 0x00007f4fc67a938b in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#15 0x00007f4fc67a9743 in cling::Interpreter::evaluate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#16 0x00007f4fc672e120 in TCling::Calc(char const*, TInterpreter::EErrorCode*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#17 0x00007f4fccd24e20 in ROOT::Detail::RDF::RLoopManager::JitActions() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libROOTDataFrame.so
#18 0x00007f4fccd280a5 in ROOT::Detail::RDF::RLoopManager::Run() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libROOTDataFrame.so
#19 0x0000000000484257 in ROOT::RDF::RResultPtr<TH2D>::TriggerRun() () at /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/include/ROOT/RResultPtr.hxx:305
#20 0x000000000047c3e8 in ROOT::RDF::RResultPtr<TH2D>::Get() () at /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/include/ROOT/RResultPtr.hxx:134
#21 0x00000000004742c6 in ROOT::RDF::RResultPtr<TH2D>::operator->() () at /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/include/ROOT/RResultPtr.hxx:173
#22 0x0000000000463a10 in CalcPrediction(std::vector<ROOT::RDF::RResultPtr<TH2D>, std::allocator<ROOT::RDF::RResultPtr<TH2D> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool) () at ~/RebalanceAndSmear/RnS/Prediction/src/DataFramePrediction.C:119
#23 0x0000000000464474 in main () at ~/RebalanceAndSmear/RnS/Prediction/src/DataFramePrediction.C:170
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  0x00007f4fc8272d34 in clang::CXXRecordDecl::getLambdaCallOperator() const () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#6  0x00007f4fc658f747 in clang::RecursiveASTVisitor<cling::(anonymous namespace)::StaticVarCollector>::TraverseLambdaExpr(clang::LambdaExpr*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*> > > >*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#7  0x00007f4fc67e59bb in clang::RecursiveASTVisitor<cling::(anonymous namespace)::StaticVarCollector>::TraverseStmt () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#8  0x00007f4fc67e68c1 in cling::DeclUnloader::VisitFunctionDecl(clang::FunctionDecl*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#9  0x00007f4fc67bc4b5 in cling::TransactionUnloader::unloadDeclarations(cling::Transaction*, cling::DeclUnloader&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#10 0x00007f4fc67bccf3 in cling::TransactionUnloader::RevertTransaction(cling::Transaction*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#11 0x00007f4fc67aa03e in cling::Interpreter::unload(cling::Transaction&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#12 0x00007f4fc680c8e9 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#13 0x00007f4fc680f47b in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#14 0x00007f4fc67a938b in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#15 0x00007f4fc67a9743 in cling::Interpreter::evaluate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value&) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#16 0x00007f4fc672e120 in TCling::Calc(char const*, TInterpreter::EErrorCode*) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so
#17 0x00007f4fccd24e20 in ROOT::Detail::RDF::RLoopManager::JitActions() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libROOTDataFrame.so
#18 0x00007f4fccd280a5 in ROOT::Detail::RDF::RLoopManager::Run() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libROOTDataFrame.so
#19 0x0000000000484257 in ROOT::RDF::RResultPtr<TH2D>::TriggerRun() () at /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/include/ROOT/RResultPtr.hxx:305
#20 0x000000000047c3e8 in ROOT::RDF::RResultPtr<TH2D>::Get() () at /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/include/ROOT/RResultPtr.hxx:134
#21 0x00000000004742c6 in ROOT::RDF::RResultPtr<TH2D>::operator->() () at /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/include/ROOT/RResultPtr.hxx:173
#22 0x0000000000463a10 in CalcPrediction(std::vector<ROOT::RDF::RResultPtr<TH2D>, std::allocator<ROOT::RDF::RResultPtr<TH2D> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool) () at ~/RebalanceAndSmear/RnS/Prediction/src/DataFramePrediction.C:119
#23 0x0000000000464474 in main () at ~/RebalanceAndSmear/RnS/Prediction/src/DataFramePrediction.C:170
===========================================================

Does anyone have an idea about this? I could find a thread with a similar problem, but it does not contain an answer.

DataFramePrediction.C (6.0 KB)
The code requires args for the command-line interface and libconfig for the configuration file.
moep.root (1.8 MB)
cutstrings_ttbar.cfg:

histograms = (
	   ("JetPt", 25, 0, 1000),
	   ("MET", 25, 0, 1000)
	   )

cuts:
{
presel = "MET>250"// && JetPt[0] > 80 && JetPt[1] > 80 && JetPt[2] > 40 && JetPt[3] > 40"
}

_ROOT Version: 6.14.04
_Platform: Scientific Linux 6
_Compiler: G++ 6.2


Hi,
ROOT v6.14 is very old in RDataFrame years.
This could very well be a bug that has been fixed since.

Could you try to switch to v6.16? It’s available on CMVFS the same way v6.14 is.

Otherwise:
From the error message it seems that something goes wrong in a call to Histo2D.
Could you isolate the line where this happens, create a small reproducer that only executes that line, and report both the line and the type of the columns whose names are passed to the Histo2D call?

Cheers,
Enrico

Hi Enrico,

I have tried with ROOT 6.16, but the error stays the same. I have boiled down the code to the attached reproducer.

It fails in line 24 on dereferencing temp. The Column JetPt contains a std::vector<Float_t>, while Ntries is an Int_t.

Cheers,

Jonas

MinimalDFP.C (575 Bytes)

g++ MinimalDFP.C -g -Og `root-config --cflags --ldflags --libs`

Hi @jndrf,
thanks for the snippet.
So the problem is that, in v6.14 and v6.16, Histo2D doesn’t like it that your columns have different types.

Below is a standalone reproducer, which crashes with the error messages you report in v6.14 and v6.16 but (I’m happy to announce) works correctly in ROOT master (which you can source from cvmfs with source /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/latest/x86_64-centos7-gcc62-opt/setup.sh (or equivalent for slc6 instead of centos7).

I think the bugfix is also present in the upcoming v6.18, so the next release (coming soon) will work correctly.

Until then, you can either use a nightly build of master (not super stable, but working most of the time – it doesn’t get updated if ROOT master is broken) or, as a workaround, you can make Ntries a vector with the same number of elements as JetPt and entries all equal to Ntries.

I hope this helps!
Cheers,
Enrico

#include <ROOT/RDataFrame.hxx>
#include <iostream>

int main() {
   auto df = ROOT::RDataFrame(10).Define("JetPt", "std::vector<float>{1.,2.,3.}")
                                 .Define("Ntries", "10");

   ROOT::RDF::TH2DModel histmodel("moep", "moep", 25, 0, 1000, 22, -2, 20);
   auto temp = df.Histo2D(histmodel, "JetPt", "Ntries");

   std::cout << temp->GetXaxis()->GetNbins() << std::endl;

   return 0;
}

Hi Enrico,

thank you, using the nightly works. At least as long as I do not try to fill with weights, then I get the familiar message about a non-matching call to exec.

Cheers,

Jonas

#include <ROOT/RDataFrame.hxx>
#include <iostream>

int main() {
   auto df = ROOT::RDataFrame(10).Define("JetPt", "std::vector<float>{1.,2.,3.}")
      .Define("Ntries", "10")
      .Define("Weight", "12");

   ROOT::RDF::TH2DModel histmodel("moep", "moep", 25, 0, 1000, 22, -2, 20);
   auto temp = df.Histo2D(histmodel, "JetPt", "Ntries", "Weight");

   std::cout << temp->GetXaxis()->GetNbins() << std::endl;

   return 0;
}

Yes, that’s not supported.
You can open a feature request on jira and apply the workaround I described above – transforming scalars into vectors.

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