-
Notifications
You must be signed in to change notification settings - Fork 0
/
view_opdetwf.py
41 lines (32 loc) · 1 KB
/
view_opdetwf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os,sys
from pyqtgraph.Qt import QtGui, QtCore
# requires pyqtgraph, pandas, ROOT, rootpy
from pylard.pylardisplay.opdetdisplay import OpDetDisplay
from pylard.pylardata.wfopdata import WFOpData
from pylard.pylardata.opdetwf import RawDigitsOpData
print 'loading QtGui.QApplication'
# expects 'raw_wf_tree'
#fname='~/uBooNE/data/PMTCommissioning/wf_000.root'
fname= sys.argv[1]
#fname = sys.argv[1]
print 'call WFOpData()'
#opdata = WFOpData( fname )
opdata = RawDigitsOpData( fname )
#opdata = RawDigitsOpData(fname)
app = QtGui.QApplication([])
print 'call OpDetDisplay()'
opdisplay = OpDetDisplay( opdata )
print opdisplay
print type(opdisplay)
print 'call show()'
opdisplay.setGeometry(500,300,1200,800)
opdisplay.setFocus()
#opdisplay.show()
print 'call main'
if __name__ == '__main__':
import sys
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
print "exec called ..."
opdisplay.show()
QtGui.QApplication.instance().exec_()
#opdisplay.show()