How do I create one with PyROOT?
like any other templated class. E.g.:[code]>>> from ROOT import TParameter
p = TParameter(int)( “mypar”, 42 )
TParameter mypar = 42
Is there a way to get the same effect of:
TParameter *tp = new TParameter(“uncert”,0.10);
tp = TParameter(float) (“uncert”,0.10)
and it doesn’t give quite the same thing.
in the end, the “template” construct with the (…) needs to be turned into a full name of the C++ class. The classes given as template parameters have their name attribute taken and that is used. Thus, although a python float is a C++ double, it will map to a C++ float, b/c float.name is ‘float’. This is debatable, but from a readability perspective, I figured it better to leave “TParameter(float)” and “TParameter(‘float’)” to be the same thing. Hence, for double, use a a string ‘double’, like in “TParameter(‘double’)”.