| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

EventLooper::Gui::Main Class Reference

List of all members.

Public Member Functions

def __init__
def createWidgets
def hist
def drain
def next

Public Attributes

 app
 b_quit
 b_next
 b_hist

Private Member Functions

def _next_cb

Private Attributes

 _canvas
 _histogram
 _nevents

Detailed Description

Definition at line 8 of file Gui.py.


Member Function Documentation

def EventLooper::Gui::Main::__init__ (   self,
  app,
  master = None 
)

Definition at line 9 of file Gui.py.

00009                                       :
00010         Frame.__init__(self,master)
00011         self.app = app
00012         self.pack()
00013         self.createWidgets()
00014         self._canvas = None
00015         self._histogram = None
00016         from DybPython.Control import nuwa
00017         self._nevents = nuwa.opts.executions
00018         return
00019 
    def createWidgets(self):

def EventLooper::Gui::Main::createWidgets (   self  ) 

Definition at line 20 of file Gui.py.

00020                            :
00021         b = Button(self)
00022         b['text'] = 'Quit'
00023         b['fg'] = 'red'
00024         b['command'] = self.quit
00025         b.pack({'side':'left'})
00026         self.b_quit = b
00027 
00028         b = Button(self)
00029         b['text'] = 'Next'
00030         b['command'] = self.next
00031         b.pack({'side':'left'})
00032         self.b_next = b
00033 
00034         b = Button(self)
00035         b['text'] = 'Hist'
00036         b['command'] = self.hist
00037         b.pack({'side':'left'})
00038         self.b_hist = b
00039         
00040         return
00041 
    def hist(self):

def EventLooper::Gui::Main::hist (   self  ) 

Definition at line 42 of file Gui.py.

00042                   :
00043         import ROOT
00044         if not self._canvas:
00045             self._canvas = ROOT.TCanvas('canvas','gaussian')
00046             self._histogram = ROOT.TH1D("gaussian","gaussian",200,-10,10)
00047             self._histogram.Draw()
00048 
00049             pass
00050         self._histogram.FillRandom("gaus")
00051         self._canvas.Modified()
00052         self._canvas.Update()
00053         return
00054     
00055 
    def drain(self):

def EventLooper::Gui::Main::drain (   self  ) 

Definition at line 56 of file Gui.py.

00056                    :
00057         #print 'draining'
00058         self.app.drain_queue()
00059         self.after(100, self.drain)
00060         return
00061 
    def _next_cb(self,res):

def EventLooper::Gui::Main::_next_cb (   self,
  res 
) [private]

Definition at line 62 of file Gui.py.

00062                           :
00063         print 'Next event loaded'
00064         if res: print 'Result: %s'%str(res)
00065         return
00066 
    def next(self):

def EventLooper::Gui::Main::next (   self  ) 

Definition at line 67 of file Gui.py.

00067                   :
00068         if not self._nevents:
00069             self.app.shutdown()
00070             self.quit()
00071         self._nevents -= 1
00072         self.app.run(self._next_cb,1)
00073         return
00074 
00075     pass


Member Data Documentation

EventLooper::Gui::Main::app

Definition at line 11 of file Gui.py.

EventLooper::Gui::Main::_canvas [private]

Definition at line 14 of file Gui.py.

EventLooper::Gui::Main::_histogram [private]

Definition at line 15 of file Gui.py.

EventLooper::Gui::Main::_nevents [private]

Definition at line 17 of file Gui.py.

EventLooper::Gui::Main::b_quit

Definition at line 26 of file Gui.py.

EventLooper::Gui::Main::b_next

Definition at line 32 of file Gui.py.

EventLooper::Gui::Main::b_hist

Definition at line 38 of file Gui.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:14:18 2011 for EventLooper by doxygen 1.4.7