Hi, all
Basically i am using the class in a real case :
What i do is
ROOT::RDataFrame dfDecay(*_tupleShared.GetTuple());
RNode last_node = dfDecay.Define("1>0","CRAPDEFINE");
using BSWeightSumColumn = decltype(dfDecay.Book< RVec<double>>( std::move( test), {"RndPoisson"}));
map< TString , map< TriggerSlot_weightConfig , BSWeightSumColumn > > _sumWBSWeights;
SumVecCol<RVec<double>, WeightDefRX::nBS> sumWBSFULL;
_sumWBSWeights[_weightOption][_slot] = nodes_cuts[FullSelectionDT].Define("weightBSFull" , weightBS_FULL.Data())
.Book< RVec<double>>( std::move( sumWBSFULL), {"weightBSFull"});
having the class for the custom action defined as :
template<typename T , int N >
class SumVecCol : public ROOT::Detail::RDF::RActionImpl<SumVecCol<T,N>> {
When i try to compile i get this :
uilding CXX object CMakeFiles/efficiencyCreateFast.out.dir/targets/efficiencyCreateFast.cpp.o
FAILED: CMakeFiles/efficiencyCreateFast.out.dir/targets/efficiencyCreateFast.cpp.o
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/bin/g++ -I/cvmfs/sft.cern.ch/lcg/releases/yamlcpp/0.6.2-fd0ec/x86_64-centos7-gcc8-opt/include -I../../pyloops -I../../roofit/src -I../../roofit/inc -I../../velo/src -I../../velo/inc -I../../kernel/src -I../../kernel/inc -I../../tuples/src -I../../tuples/inc -I../../optimization/src -I../../optimization/inc -I../../efficiencies/src -I../../efficiencies/inc -I../../fitter/src -I../../fitter/inc -I../../toys/src -I../../toys/inc -isystem /cvmfs/sft.cern.ch/lcg/releases/vdt/0.4.3-992df/x86_64-centos7-gcc8-opt/include -fPIC -DDROP_CGAL -Wno-return-type -Wno-deprecated-declarations -Wimplicit-fallthrough -std=c++17 -pipe -fsigned-char -pthread -O2 -g -DNDEBUG -std=gnu++17 -MD -MT CMakeFiles/efficiencyCreateFast.out.dir/targets/efficiencyCreateFast.cpp.o -MF CMakeFiles/efficiencyCreateFast.out.dir/targets/efficiencyCreateFast.cpp.o.d -o CMakeFiles/efficiencyCreateFast.out.dir/targets/efficiencyCreateFast.cpp.o -c ../../targets/efficiencyCreateFast.cpp
In file included from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/unique_ptr.h:37,
from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/locale_conv.h:41,
from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/locale:43,
from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/iomanip:43,
from ../../kernel/inc/MessageSvc.hpp:5,
from ../../kernel/inc/EnumeratorSvc.hpp:4,
from ../../kernel/inc/IOSvc.hpp:4,
from ../../efficiencies/inc/CounterHelpers.hpp:4,
from ../../targets/efficiencyCreateFast.cpp:6:
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/tuple: In instantiation of ‘std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) [with _Args1 = {const TString&}; long unsigned int ..._Indexes1 = {0}; _Args2 = {}; long unsigned int ..._Indexes2 = {}; _T1 = const TString; _T2 = ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void>]’:
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/tuple:1657:63: required from ‘std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>) [with _Args1 = {const TString&}; _Args2 = {}; _T1 = const TString; _T2 = ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void>]’
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/ext/new_allocator.h:136:4: required from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> >; _Args = {const std::piecewise_construct_t&, std::tuple<const TString&>, std::tuple<>}; _Tp = std::_Rb_tree_node<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >]’
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> >; _Args = {const std::piecewise_construct_t&, std::tuple<const TString&>, std::tuple<>}; _Tp = std::_Rb_tree_node<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::_Rb_tree_node<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > > >]’
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/stl_tree.h:637:32: required from ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_construct_node(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const TString&>, std::tuple<>}; _Key = TString; _Val = std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> >; _KeyOfValue = std::_Select1st<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; _Compare = std::less<TString>; _Alloc = std::allocator<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >*]’
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/stl_tree.h:654:4: required from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const TString&>, std::tuple<>}; _Key = TString; _Val = std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> >; _KeyOfValue = std::_Select1st<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; _Compare = std::less<TString>; _Alloc = std::allocator<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >*]’
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/stl_tree.h:2414:13: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const TString&>, std::tuple<>}; _Key = TString; _Val = std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> >; _KeyOfValue = std::_Select1st<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; _Compare = std::less<TString>; _Alloc = std::allocator<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >]’
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/stl_map.h:499:8: required from ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = TString; _Tp = ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void>; _Compare = std::less<TString>; _Alloc = std::allocator<std::pair<const TString, ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = TString]’
../../targets/efficiencyCreateFast.cpp:1188:97: required from here
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/tuple:1668:70: error: no matching function for call to ‘ROOT::RDF::RInterface<ROOT::Detail::RDF::RNodeBase, void>::RInterface()’
second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...)
^
In file included from /cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDataFrame.hxx:20,
from ../../efficiencies/inc/CounterHelpers.hpp:9,
from ../../targets/efficiencyCreateFast.cpp:6:
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDF/RInterface.hxx:2481:4: note: candidate: ‘ROOT::RDF::RInterface<T, V>::RInterface(const std::shared_ptr<_Tp>&, ROOT::RDF::RInterface<T, V>::RLoopManager&, const ROOT::Internal::RDF::RBookedCustomColumns&, ROOT::RDF::RDataSource*) [with Proxied = ROOT::Detail::RDF::RNodeBase; DataSource = void; ROOT::RDF::RInterface<T, V>::RLoopManager = ROOT::Detail::RDF::RLoopManager]’
RInterface(const std::shared_ptr<Proxied> &proxied, RLoopManager &lm,
^~~~~~~~~~
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDF/RInterface.hxx:2481:4: note: candidate expects 4 arguments, 0 provided
In file included from /cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDataFrame.hxx:20,
from ../../efficiencies/inc/CounterHelpers.hpp:9,
from ../../targets/efficiencyCreateFast.cpp:6:
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDF/RInterface.hxx:126:4: note: candidate: ‘template<class T, typename std::enable_if<std::is_same<T, ROOT::Detail::RDF::RLoopManager>::value, int>::type <anonymous> > ROOT::RDF::RInterface<T, V>::RInterface(const std::shared_ptr<_Tp>&)’
RInterface(const std::shared_ptr<Proxied> &proxied)
^~~~~~~~~~
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDF/RInterface.hxx:126:4: note: template argument deduction/substitution failed:
In file included from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/unique_ptr.h:37,
from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/bits/locale_conv.h:41,
from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/locale:43,
from /cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/iomanip:43,
from ../../kernel/inc/MessageSvc.hpp:5,
from ../../kernel/inc/EnumeratorSvc.hpp:4,
from ../../kernel/inc/IOSvc.hpp:4,
from ../../efficiencies/inc/CounterHelpers.hpp:4,
from ../../targets/efficiencyCreateFast.cpp:6:
/cvmfs/sft.cern.ch/lcg/releases/gcc/8.3.0-cebb0/x86_64-centos7/include/c++/8.3.0/tuple:1668:70: note: candidate expects 1 argument, 0 provided
second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...)
^
In file included from /cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDataFrame.hxx:20,
from ../../efficiencies/inc/CounterHelpers.hpp:9,
from ../../targets/efficiencyCreateFast.cpp:6:
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDF/RInterface.hxx:121:4: note: candidate: ‘ROOT::RDF::RInterface<T, V>::RInterface(ROOT::RDF::RInterface<T, V>&&) [with Proxied = ROOT::Detail::RDF::RNodeBase; DataSource = void]’
RInterface(RInterface &&) = default;
^~~~~~~~~~
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDF/RInterface.hxx:121:4: note: candidate expects 1 argument, 0 provided
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include/ROOT/RDF/RInterface.hxx:117:4: note: candidate: ‘ROOT::RDF::RInterface<T, V>::RInterface(const ROOT::RDF::RInterface<T, V>&) [with Proxied = ROOT::Detail::RDF::RNodeBase; DataSource = void]’
RInterface(const RInterface &) = default;
^~~~~~~~~~
/cvmfs/sft.cern.ch/lcg/views/LCG_96b/x86_64-centos7-gcc8-opt/include
If i comment out the map-value assignment it works.
I wonder how i can cast the Book<> operation with my custom Action implementation in the map.
Thanks.