TUnfold and pyroot

Hello,

I am trying to use TUnfold within pyroot. I am looking at the example here:

https://root.cern.ch/doc/v608/group__tutorial__unfold5.html

The “ScanTau” method takes a pointer to a pointer to TSpline, which is then allocated within the ScanTau method itself.

https://root.cern.ch/doc/v608/classTUnfoldDensity.html#ae0bbf9cb57d1b042b795291a02eaafb1

How can this be accomplished in python? I tried just passing a TSpline3 but that gives a segfault.

Cheers,
Sal

Please provide the following information:


ROOT Version (e.g. 6.12/02): Not relevant
Platform, compiler (e.g. CentOS 7.3, gcc6.2): Not relevant


Use ROOT.AddressOf(tspline_object) to get ptr-ptr.

Hi,

Thanks for the reply, but this needs to be initialized to zero and then the ScanTau function acts as a factory, so the “tspline_object” should be null. How do I handle that case?
Cheers,
Sal

ROOT.MakeNullPointer(ROOT.TSpline)

Thanks a lot!
Cheers,
Sal

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.