I am writting an external macro that looks like this:
TTree* t2(string fname, int num){
cout << "file number: "<< num << endl;
TTree* tree=new TTree(fname.c_str(),"tttname");
return tree;
}
Then in jupyterlab, I run ROOT.gROOT.ProcessLine('.x ./t2.C("hhh",465)')
What I want is that this macro return a <cppyy.gbl.TTree object at 0x55b9c272f920>
object in python so i can readily access it.
Instead, the macro return the address (which is a hex
converted to int
), this makes the access of the object not straightforward (as i need to get back the object by its address). (see figure)
Is there any tweak to the macro so that I can do the thing in a more straightforward way ?
_ROOT Version: 6.24 (PyROOT via conda)
_Platform:Centos7
_Compiler: gcc9