Articles

TCanvas and ownership

In howto on Sep 21, 2012 by theoryl Tagged: , ,

I’m getting random segmentation faults making plots on pyROOT. It turned out that there is a little secret:

from ROOT import SetOwnership
canvas = ROOT.TCanvas()
SetOwnership(canvas, False)

Not entirely sure what it does, but it makes the canvas behave as expected as in plain old ROOT.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: