Convert return of chain.Process

Hello,

i wrote a c++ programm (using ROOT) which returns a tree which includes a vector. I call that c++ programm with the chain.Process function in python 2.6.6. The chain.Process function gives me back a address of type long long of the returned tree.
How i can tell python that the address is a chain?

In ROOT I convert the address of type long long to a chain like that:
var=chain.Process(code.C,…,…) //variable var gets the value of the
returned
address
TChain chain2=(TChain)var //chain2 is now a chain with the tree which
include the vector

how can i do that in python?
Can anyone help?

Thanks

Hi,

[quote=“mel1”]The chain.Process function gives me back a address of type long long of the returned tree.
How i can tell python that the address is a chain?[/quote]Are you sure? The normal TChain::Process does not return an address AFAICS (yes, it’s a Long64_t).

[quote=“mel1”]how can i do that in python?[/quote]Use ROOT.BindObject(address, klass) to bind the object at address to a python object of type klass.

Cheers,
Wim

Hello wim,

it works. Thanks!