Hello,
I’m having trouble creating a TPie graph with this constructor:
TPie::TPie(const char*, const char*, Int_t, Float_t*, Int_t* cols = 0, const char** lbls = 0) =>
could not convert argument 6
My Python code does the following:
p = ROOT.TPie('%s_Muon_Mother' % name, 'Muon\'s Mother in %s' % title, len(counts), array('f', counts), array('i', [0]), pdgs)
where counts is a list of ints, and pdgs is a list of strs. I’m using the array module, because I believe thats what one has to do when the C++ side of things is expecting an array. Obviously, the last argument, pdgs, is not working. It needs to be an array of character arrays, but the Python array module cannot make arrays of arrays. What can I do?
The other thing I tried was to make a list of character arrays, but that did not work either.
lbls = map(lambda s: array('c', s), pdgs)
p = ROOT.TPie('%s_Muon_Mother' % name, 'Muon\'s Mother in %s' % title, len(counts), array('f', counts), array('i', [0]), lbls)
Thanks for your help.