Пример #1
0
    def __init__(self, fname=None):
        """fname : str - the file name with configuration parameters, if not specified then use default.
        """
        PSConfigParameters.__init__(self)

        logger.debug('In %s c-tor')

        #self.fname_cp = '%s/%s' % (os.path.expanduser('~'), '.confpars-montool.txt') # Default config file name
        self.fname_cp = './cm-confpars.txt'  # Default config file name

        self.declareParameters()
        self.readParametersFromFile()
        #self.printParameters()

        #nm.set_config_pars(self)

        self.list_of_hosts = lshosts(
            filter='psanaphi')  # ('psanaphi105', 'psanaphi106', 'psanaphi107')

        self.list_of_ports = (27017, 27018, 27019, 27020, 27021)
        self.list_of_str_ports = [str(v) for v in self.list_of_ports]

        self.list_of_doc_widgets = ('Text', 'List', 'Table')

        # Widgets with direct access
        self.cmwmain = None
        self.cmwmaintabs = None
        self.cmwdbmain = None
        self.cmwdbtree = None
        self.cmwdbdocs = None
        self.cmwdbdocswidg = None
        self.qwloggerstd = None
        self.cmwdbdoceditor = None

        self.last_selection = None  # self.DB_COLS, DOCS
Пример #2
0
    def __init__(self, fname=None):
        """fname: str - the file name with configuration parameters, if not specified then use default.
        """
        PSConfigParameters.__init__(self)

        logger.debug('In %s c-tor')

        #self.fname_cp = '%s/%s' % (os.path.expanduser('~'), '.confpars-montool.txt') # Default config file name
        self.fname_cp = './cm-confpars.txt' # Default config file name

        self.declareParameters()
        self.readParametersFromFile()
        #self.printParameters()

        self.list_of_hosts = ['psdb01','psdb02','psdb03','psdb04',\
           'psanagpu114', 'psanaphi105', 'psanaphi106', 'psanaphi107','psdbdev01']
        self.list_of_hosts.append('psdb-dev')

        self.list_of_ports = (27017, 27018, 27019, 27020, 27021, 9306, 9307, 9308)
        self.list_of_str_ports = [str(v) for v in self.list_of_ports]

        self.list_of_doc_widgets = ('Text','List','Table')

        # Widgets with direct access
        self.cmwmain     = None
        self.cmwmaintabs = None
        self.cmwdbmain   = None
        self.cmwdbtree   = None
        self.cmwdbdocs   = None
        self.cmwdbdocswidg=None
        self.qwloggerstd = None
        self.cmwdbdoceditor = None
        self.ivspectrum  = None
        self.ivcontrol   = None
        self.ivmain      = None
        self.ivimageaxes = None
        self.wlog        = None

        self.last_selection = None
        self.user = cc.USERNAME
        self.upwd = None

        self.h5vmain = None
        self.fstree  = None
        self.fmwtabs = None
        self.fmw1main = None
        self.fmw1control = None

        self.dmqwmain = None
        self.dmqwlist = None
        self.dmqwcontrol = None
Пример #3
0
    def __init__(self, fname=None):
        """fname : str - the file name with configuration parameters, if not specified then use default.
        """
        PSConfigParameters.__init__(self)

        logger.debug('In %s c-tor')

        #self.fname_cp = '%s/%s' % (os.path.expanduser('~'), '.h5v-confpars.txt') # Default config file name
        self.fname_cp = './h5v-confpars.txt'  # Default config file name

        self.declareParameters()
        self.readParametersFromFile()
        #self.printParameters()

        # Widgets with direct access
        self.h5vmain = None
Пример #4
0
        if status_index == 2:
            self.tit_status.setStyleSheet(style.styleStatusAlarm)

        #self.tit_status.setText('Status: ' + list_of_states[status_index] + msg)
        self.tit_status.setText(msg)


#------------------------------

if __name__ == "__main__":
    import sys
    from psana.pyalgos.generic.PSConfigParameters import PSConfigParameters
    from psana.pyalgos.generic.LoggerLight import logger as log
    from PyQt5.QtWidgets import QApplication

    cp = PSConfigParameters()

    app = QApplication(sys.argv)
    w = QWLogger(log, cp)
    w.setWindowTitle(w._name)

    from psana.graphqt.QWIcons import icon  # should be imported after QApplication
    icon.set_icons()
    w.setWindowIcon(icon.icon_logviewer)

    w.show()
    app.exec_()
    sys.exit(0)

#------------------------------