A Simple GUI Example.
from __future__ import print_function
import os, sys, ROOT
import math
if (par[2] != 0.0):
arg1 = (x[0]-par[1])/par[2]
arg2 = (0.01*0.39894228)/par[2]
arg3 = par[0]/(1+par[3])
gauss = arg3*arg2*
math.exp(-0.5*arg1*arg1)
else:
print('returning 0')
gauss = 0.
return gauss
tpygaus =
ROOT.TF1(
'pygaus', pygaus, -4, 4, 4 )
global tpygaus, window
def __init__( self, parent, width, height ):
self.DrawButton.Connect( 'Clicked()', "TPyDispatcher", m, 'Dispatch()' )
self.ExitButton.SetCommand( 'TPython::Exec( "raise SystemExit" )' )
self.SetWindowName( 'My first GUI' )
self.MapSubwindows()
self.Resize( self.GetDefaultSize() )
self.MapWindow()
self.Cleanup()
if __name__ == '__main__':
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
- Author
- Wim Lavrijsen
Definition in file gui_simple.py.