GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
grut-view.py
Go to the documentation of this file.
1 import gc
2 import os
3 import sys
4 import warnings
5 import threading
6 import Tkinter as tk
7 import time
8 
9 import ROOT
10 ROOT.PyConfig.IgnoreCommandLineOptions = True
11 warnings.filterwarnings(action='ignore',category=RuntimeWarning,
12  message='creating converter.*')
13 ROOT.PyConfig.StartGuiThread = False
14 ROOT.PyConfig.IgnoreCommandLineOptions = True
15 
16 sys.argv = sys.argv[1:] # ROOT appends 'python' to the beginning of sys.argv
17 sys.argv.insert(0,'grut-view.py')
18 
19 sys.path.append(os.environ['GRSISYS'])
20 from pygui.mainwindow import MainWindow
21 
22 ident = threading.current_thread().ident
23 
24 def update():
25  try:
26  if (threading.current_thread().ident == ident and
27  window is not None):
28  window.Update()
29  except tk.TclError:
30  pass
31  except Exception as e:
32  print e
33 
34 def on_close():
35  global window
36  window = None
37  gc.collect()
38 
39 window = None
40 window = MainWindow()
def on_close()
Definition: grut-view.py:34