Dear experts,
I ran into a problem when adding a new module to my RDF analyzer. I included the error at the end since it’s pretty lengthy. The issue seems to be coming from using .Filter in the module HEM.h that is called in postprocess_W.cxx and is ran with runpostprocess_W.sh. I’ve used the Filter function in the past in other modules but never ran into this error. Thank you for the help!
Hichem
Platform: lxplus el9
Error:
In file included from postprocess_W.cxx:39:
helpers/HEM.h: In instantiation of 'auto ApplyHEM(T&, std::string) [with T = ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>; std::string = std::__cxx11::basic_string<char>]':
postprocess_W.cxx:242:24: required from here
helpers/HEM.h:40:110: error: inconsistent deduction for auto return type: 'ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter, void>' and then ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>'
40 | return df.Define("weight_HEM_nominal", HEM_region_WH, {"eta_fatjet", "phi_fatjet", "eta_lep", "phi_lep"});
| ^
helpers/HEM.h:40:110: error: no matching function for call to 'ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter, void>::RInterface(ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>)'
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDataFrame.hxx:21,
from postprocess_W.cxx:12:
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:226:4: note: candidate: 'template<class T, class> ROOT::RDF::RInterface<T, V>::RInterface(const std::shared_ptr<ROOT::Detail::RDF::RLoopManager>&) [with T = T; <template-parameter-2-2> = <template-parameter-1-2>; Proxied = ROOT::Detail::RDF::RJittedFilter; DataSource = void]'
226 | RInterface(const std::shared_ptr<RLoopManager> &proxied)
| ^~~~~~~~~~
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:226:4: note: template argument deduction/substitution failed:
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/Rtypes.h:31,
from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/TObject.h:17,
from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/TNamed.h:25,
from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/TDirectory.h:24,
from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/TROOT.h:28,
from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDataFrame.hxx:19,
from postprocess_W.cxx:12:
/cvmfs/cms.cern.ch/el9_amd64_gcc11/external/gcc/11.2.1-f9b9dfdd886f71cd63f5538223d8f161/include/c++/11.2.1/type_traits: In substitution of 'template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = int]':
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:225:36: required from 'auto ApplyHEM(T&, std::string) [with T = ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>; std::string = std::__cxx11::basic_string<char>]'
postprocess_W.cxx:242:24: required from here
/cvmfs/cms.cern.ch/el9_amd64_gcc11/external/gcc/11.2.1-f9b9dfdd886f71cd63f5538223d8f161/include/c++/11.2.1/type_traits:2585:11: error: no type named 'type' in 'struct std::enable_if<false, int>'
2585 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDataFrame.hxx:21,
from postprocess_W.cxx:12:
helpers/HEM.h: In instantiation of 'auto ApplyHEM(T&, std::string) [with T = ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>; std::string = std::__cxx11::basic_string<char>]':
postprocess_W.cxx:242:24: required from here
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:3299:4: note: candidate: 'ROOT::RDF::RInterface<T, V>::RInterface(const std::shared_ptr<_Tp>&, ROOT::RDF::RInterface<T, V>::RLoopManager&, const ROOT::Internal::RDF::RColumnRegister&, ROOT::RDF::RDataSource*) [with Proxied = ROOT::Detail::RDF::RJittedFilter; DataSource = void; ROOT::RDF::RInterface<T, V>::RLoopManager = ROOT::Detail::RDF::RLoopManager]'
3299 | RInterface(const std::shared_ptr<Proxied> &proxied, RLoopManager &lm, const RDFInternal::RColumnRegister &columns,
| ^~~~~~~~~~
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:3299:4: note: candidate expects 4 arguments, 1 provided
In file included from /cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDataFrame.hxx:21,
from postprocess_W.cxx:12:
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:216:4: note: candidate: 'ROOT::RDF::RInterface<T, V>::RInterface(ROOT::RDF::RInterface<T, V>&&) [with Proxied = ROOT::Detail::RDF::RJittedFilter; DataSource = void]'
216 | RInterface(RInterface &&) = default;
| ^~~~~~~~~~
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:216:15: note: no known conversion for argument 1 from 'ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>' to 'ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter, void>&&'
216 | RInterface(RInterface &&) = default;
| ^~~~~~~~~~~~~
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:212:4: note: candidate: 'ROOT::RDF::RInterface<T, V>::RInterface(const ROOT::RDF::RInterface<T, V>&) [with Proxied = ROOT::Detail::RDF::RJittedFilter; DataSource = void]'
212 | RInterface(const RInterface &) = default;
| ^~~~~~~~~~
/cvmfs/cms.cern.ch/el9_amd64_gcc11/cms/cmssw/CMSSW_13_1_0_pre4/external/el9_amd64_gcc11/bin/../../../../../../../el9_amd64_gcc11/lcg/root/6.26.11-c74497fa7b0ab8f85c01e868f4d2fa9e/include/ROOT/RDF/RInterface.hxx:212:15: note: no known conversion for argument 1 from 'ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager>' to 'const ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter, void>&'
212 | RInterface(const RInterface &) = default;