Hi,
I want to rewrite a part of my python+ROOT script in C++. I created the “setup.py” script, and I wrote a dummy C++ code for my function. So when I make a python call
myfunc(o)
it goes to the C++ code:
[code]
static PyObject *
myfunc(PyObject *self, PyObject *args)
{
PyObject *o;
if( !PyArg_ParseTuple(args, “O”, &o) )
return NULL;
std::printf("We are here... So what?\n");
// TObject *oo = ?????? (how to get back the ROOT object?)
return Py_BuildValue("");
}[/code]
and it prints the message which I want… So far so good. But if my original ‘o’ object was created as:
o = ROOT.TTree(....)
how can I get it back to my C++ code:
TTree *_o = ????????
Thank you very much in advance!
Alexander.