Hi everyone,
after having compiled Root the traditional way it now has Ruby support, which is a great feature. Writing Root scripts in Ruby is a breeze!
However, motivated by this success I tried to also wrap a simple analysis class originally generated by Root using SWIG. Although I can use both Root Ruby objects and my SWIG-wrapped object at the same time, but interaction is a problem because internally the objects are represented differently. For example, the constructor of my class takes a TTree * as parameter:
Since SWIG does not know about TTrees it cannot convert a ruby TTree (or TChain) to a C++ TTree automatically.
My naive idea to solve this is to write a SWIG typemap that is called for this conversion and get the underlying TTree * from the libRuby object explicitely. Is there documentation on the libRuby interface where I can find out which function to call? Or is this approach flawed to begin with? Thanks in advance.
Cheers
Jan