How can I call an arbitrary constructor dynamically?

I’ve got a TClass object pointing to a ROOT object. Say TH1F. I’d like to call the ctor with teh arguments “dude”, “here”, 100, 0.0, 100.0 - how do I do that? I know I can do TClass::New to create an object with the default construtor - but I’d like to do it for a non-default one. TMethodCall looks promising, but I’m a bit nervous about how I should pre-allocate memory, etc., etc…


In the end, things like pyROOT and the ruby linkage must do this on their own. So, copy them. Unfortunately, this means going down into code against CINT directly - which requires some effort. It took me about 6-8 hours of work to get everything (not just ctor’s, but other methods as well).