Extend ROOT abstract class in python

Hi,

I’m trying to use the TFoam class of PyROOT, and for this I need to extend the TFoamIntegrand abstract class:

class Dist(TFoamIntegrand):
	def Density(self,nDim,args):
		return 0.

But of course I get:
TypeError: TFoamIntegrand is abstract and can not be instantiated (which is called during init(self)).

Is there a simple or more complicated way to extend this TFoamIntegrand class?

Cheers,
Maxime

Hi,

complicated yes, simple no. Is not only a problem of the abstract base, but also a matter of overriding the methods in a way that the overrides are see in C++.

Probably not worth the trouble.

Cheers,
Wim