Returning long long* in PyROOT

Hi,

I would like to use a TTreeIndex::GetIndex() in python. However, returning the type “long long*” in python this is cast to None.

I know 1-D c arrays work fine in PyROOT for double and int types. I can’t recall using floats or shorts recently though.

Is this a bug? Could it be fixed? Is there a useful work around for the TTreeIndex::GetIndex function.

I use this to sort TTrees by calling TTree::BuildIndex(""), then use TTreeIndex::GetIndex to get the sorted values.

Thanks,

Elliott

Hi,

at issue is that for python’s array module (which is used for all other builtin types) does not support long long* (not until p3.3 anyway).

Cheers,
Wim

Ah,

Thanks. I’ll just write a wrapper.

Elliott

thanks for the comment. I now have a simple wrapper that returns a std::vector<Long64_t>. Should have realized the issue anyway.

Elliott