pyROOT and RDataFrame Take

Hi all,

I have come across an issue i can solve with a ROOT macro but not in pyROOT.

I basically have a TTree storing branches as :

 FT_true_x       = (vector<float>*)0x7fb8c6e4a840
 FT_true_z       = (vector<float>*)0x7fb8c6e4ac20
 FT_true_y       = (vector<float>*)0x7fb8c6e4b090
 FT_true_dxdy    = (vector<float>*)0x7fb8c6e4b540
 FT_true_dzdy    = (vector<float>*)0x7fb8c6e4b980

And i want to Take the column.
In C++ all works fine defining Take<vector<float>>("FT_true_z")
I wonder what is the pythonic way of doing it and if it exists.


From Python, can you try df.Take('std::vector<float>')('FT_true_z') ?

Yes i give it a try, btw, the AsNumpy() worked fine, so there should be something along templating methods and inferring types going on with pyROOT.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.