Dear experts,
I am trying to pass to TF1 a function pointer defined in ruby, with the following ruby script, but not yet succeeded.
require 'libRuby'
def func_ruby(x, par)
return par[0] + par[1] * x[0]
end
myFunc = TF1.new('myFunc', :func_ruby, 0, 1, 2)
I am not even sure this functionality (passing ruby function pointer to ROOT methods) is available in Ruby-root. In the Ruby-root’s authors document, ftp://root.cern.ch/root/RubyRoot.pdf at Appendix B.10, he says ‘this functionality would be implemented in the official ruby-root binding in the near future’.
Does anyone know how to do this, or if this functionality is available or not?
Thank you in advance.
Takeshi