I have some python code that generates tuples of values, on which I would like to call a macro that I previously loaded.
When I do this, I get a typeerror :
import ROOT as r
from root_numpy import tree2array
file = r.TFile(‘myfile.root’)
mytree = file.get(‘mytree’)
my_data = tree2array(mytree, branches_list)
When I try to compare the types expected by my_macro and the types in my tuple, they are exactly the same except that the tuple ones are numpy types and not native python types.
Is this the reason why the conversion fails?
If yes, how could I avoid that issue?
edit : just for the sake of completeness, the type conversion error occurs on the first argument which is a np.int16 and expected to be an int, but some of the later arguments are 1D arrays where the macro expects a pointer, if that could be a problem).