Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

test_power.py

00001 #!/usr/local/bin/python
00002 #
00003 #                               Copyright 2004
00004 #                                     by
00005 #                        The Board of Trustees of the
00006 #                     Leland Stanford Junior University.
00007 #                            All rights reserved.
00008 #
00009 
00010 
00011 __facility__ = "Online"
00012 __abstract__ = "Power Panel Debug class"
00013 __author__   = "Gregg Thayer <jgt@SLAC.Stanford.edu> SLAC - GLAST I&T/Online"
00014 __date__     = ("$Date: 2004/12/15 02:44:06 $").split(' ')[1]
00015 __version__  = "$Revision: 2.1 $"
00016 __release__  = "$Name: R04-12-00 $"
00017 __credits__  = "SLAC"
00018 
00019 import LATTE.copyright_SLAC
00020 
00021 import qt
00022 import logging
00023 
00024 from LATTE.client.gOptions import Options
00025 from LATTE.client.gCmdCli import CmdCli
00026 from LATTE.database.gLAT import GLAT
00027 from LATTE.database.gXBR import GXBRD
00028 from LATTE.power.PorcinePanel import PorcineWindow
00029 
00030 def test_power(args):
00031     options=Options(['server','schema'])
00032     try:
00033         options.parse()
00034     except Exception, msg:
00035         options.usage(str(msg))
00036         return
00037 
00038     cmdcli=CmdCli()
00039     lat=GLAT(cmdcli)
00040     lat.readSchema(options.opts['schema'])
00041 
00042     xbrd=GXBRD(cmdcli)
00043     xbrd.readSchema(options.opts['schema'])
00044     
00045     logging.getLogger("").setLevel(logging.DEBUG)
00046 
00047     cmdcli.connect(options.opts['server'])
00048     
00049     app=qt.QApplication(args)
00050     gui=PorcineWindow(lat,xbrd)
00051 
00052     app.connect(app,qt.SIGNAL("lastWindowClosed()"),
00053                 app,qt.SLOT("quit()"))
00054     app.setMainWidget(gui)
00055     gui.show()
00056     app.exec_loop()
00057 
00058     cmdcli.disconnect()
00059 
00060 if __name__=='__main__':
00061     import sys
00062     test_power(sys.argv)

Generated on Fri Jul 21 13:26:32 2006 for LATTE R04-12-00 by doxygen 1.4.3