Dear Experts,
I’ve made a simple library in C++ which I try to include in my python3 jupyter-notebook and use with RDataFrame. I compile the library in root
.L Cfunctions.cxx+
In the jupyter-notebook I do
R.gSystem.Load("./Cfunctions_cxx.so")
R.gInterpreter.Declare('#include "Cfunctions.h"')
However, when I try to use the function in the notebook with my RDataFrame
sum = df.Filter("myFilter(nVtx)").Sum("mu")
I get the error message below. Does anyone understand what I am doing wrong? I’m using ROOT version 6.22/09. Example code can be found here: CERNBox
Thanks a lot for any help!
best,
Eirik
---------------------------------------------------------------------------
runtime_error Traceback (most recent call last)
<ipython-input-9-a5c3de41fe1a> in <module>
----> 1 sum = df.Filter("myFilter(nVtx)").Sum("mu")
runtime_error: Template method resolution failed:
ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter,void> ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter,void>::Filter(experimental::basic_string_view<char,char_traits<char> > expression, experimental::basic_string_view<char,char_traits<char> > name = "") =>
runtime_error:
RDataFrame: An error occurred during just-in-time compilation. The lines above might indicate the cause of the crash
All RDF objects that have not run an event loop yet should be considered in an invalid state.
ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter,void> ROOT::RDF::RInterface<ROOT::Detail::RDF::RJittedFilter,void>::Filter(experimental::basic_string_view<char,char_traits<char> > expression, experimental::basic_string_view<char,char_traits<char> > name = "") =>
runtime_error:
RDataFrame: An error occurred during just-in-time compilation. The lines above might indicate the cause of the crash
All RDF objects that have not run an event loop yet should be considered in an invalid state.
input_line_98:2:39: error: use of undeclared identifier 'myFilter'
auto lambda5 = [](Int_t& var0){return myFilter(var0)