From f99c4af084851f49b8622d0023eaedccf56dac87 Mon Sep 17 00:00:00 2001 From: chrin Date: Tue, 28 Jun 2022 10:50:17 +0200 Subject: [PATCH] new commit --- mainwindow.py | 62 -------------------- sf.json | 153 -------------------------------------------------- 2 files changed, 215 deletions(-) delete mode 100644 mainwindow.py delete mode 100644 sf.json diff --git a/mainwindow.py b/mainwindow.py deleted file mode 100644 index a40c7a6..0000000 --- a/mainwindow.py +++ /dev/null @@ -1,62 +0,0 @@ -import inspect -import os - -# Third-party modules -from qtpy.QtCore import (PYQT_VERSION_STR, Signal, Slot, QFile, QFileInfo, - QIODevice, QMutex, QSettings, QSize, Qt, QTimer, - qVersion) -from qtpy.QtCore import __version__ as QT_VERSION_STR -from qtpy.QtGui import (QColor, QKeySequence, QFont, QIcon, QPainter, QPalette, - QPixmap) -from qtpy.QtPrintSupport import QPrinter, QPrintDialog -from qtpy.QtWidgets import (QAbstractItemView, QAction, QActionGroup, - QApplication, QButtonGroup, QComboBox, QDialog, - QDockWidget, QDoubleSpinBox, QFileDialog, QFrame, - QGridLayout, QGroupBox, QHBoxLayout, QLabel, - QLayout, QLineEdit, QListWidget, QMainWindow, QMenu, - QMenuBar, QMessageBox, QPlainTextEdit, QProgressBar, - QPushButton, QScrollArea, QSizePolicy, QSlider, - QSpinBox, QSplashScreen, QStyle, QStyleOptionSlider, - QToolButton, QVBoxLayout, QWidget) - -from pyqtacc.bdbase.base import BaseWindow -from pyqtacc.bdbase.enumkind import MsgSeverity, UserMode -from pyqtacc.bdbase.guiframe import GUIFrame -from pyqtacc.sf.guiheader import GUIHeader - -_pymodule = os.path.basename(__file__) -_appversion = "1.0.0" - -def _line(): - """Macro to return the current line number. - - The current line number within the file is used when - reporting messages to the message logging window. - - Returns: - int: Current line number. - """ - return inspect.currentframe().f_back.f_lineno - -class MainWindow(BaseWindow): - - def __init__(self, parent=None, pymodule=_pymodule, appversion="", - title="", user_mode=UserMode.OPERATION): - super(MainWindow, self).__init__(parent, pymodule, appversion, title) - self.appname, appext = pymodule.split(".") - self.title = title - self.gui_frame = GUIFrame(self, self.appname) - self.show_log_message = self.gui_frame.show_log_message - self.gui_header = GUIHeader(self, user_mode) - self.mainwindow = QWidget() - self.mainwindow_layout = QVBoxLayout() - #self.mainwindow_layout.addLayout(self.gui_header.top_layout) - self.mainwindow_layout.addWidget(self.gui_header.header_wgt) - self.mainwindow_layout.addWidget(self.gui_frame.central_tab_widget) - self.mainwindow.setLayout(self.mainwindow_layout) - self.mainwindow.setMinimumHeight(400) - self.mainwindow.setMinimumWidth(1100) - - self.setCentralWidget(self.mainwindow) - self.show_log_message(MsgSeverity.INFO, _pymodule, _line(), - "Application started") diff --git a/sf.json b/sf.json deleted file mode 100644 index ba93ee7..0000000 --- a/sf.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "menuFlags":{ - "hasFile": 1, - "loadInitFile": 1, - "hasDaq": 1, - "hasH5" : 1, - "hasEpics" : 1 - }, - "Expt": { - "encoding": "UTF-8", - "beamline": "", - "exptColorBg": "blue", - "exptColorFg": "white", - "operator": "sfop" - }, - "ElogBooks": { - "SwissFEL+commissioning": { - "url": "https://elog-gfa.psi.ch:443/SwissFEL+commissioning", - "destination": "/afs/psi.ch/intranet/Controls/tmp/elog/ePic/SwissFEL+commissioning/" - }, - "SwissFEL+commissioning+data": { - "url": "https://elog-gfa.psi.ch:443/SwissFEL+commissioning+data", - "destination": "/afs/psi.ch/intranet/Controls/tmp/elog/ePic/SwissFEL+commissioning+data/" - }, - "SwissFEL+test": { - "url": "https://elog-gfa.psi.ch:443/SwissFEL+test", - "destination": "/afs/psi.ch/intranet/Controls/tmp/elog/ePic/SwissFEL+test/" - }, - "SwissFEL+test+data": { - "url": "https://elog-gfa.psi.ch:443/SwissFEL+test+data", - "destination": "/afs/psi.ch/intranet/Controls/tmp/elog/ePic/SwissFEL+test+data/" - } - }, - "Elog": { - "useELOGenv" : 0, - "host": "elog-gfa.psi.ch", - "book": "SwissFEL+commissioning+data", - "url": "https://elog-gfa.psi.ch:443/SwissFEL+commissioning+data", - "destination": "/afs/psi.ch/intranet/Controls/tmp/elog/ePic/SwissFEL+commissioning+data/", - "category": ["Info","Measurement"], - "system" : ["","Beamdynamics","Controls", "Diagnostics", "Electric supply", "Insertion-devices", "Laser", - "Magnet Power Supplies", "Operation", "RF", "Safety", "Vacuum", "Water cooling", "Other", "Unknown"], - "domain" : ["","Injector","Linac1","Linac2","Linac3","Aramis","Aramis Beamlines","Athos","Athos Beamlines"], - "section" : [ [""], - ["","SINEG01", "SINBD01", "SINSB01", "SINSB02", "SINLH01", "SINLH02", "SINLH03", "SINSB03", "SINSB04", "SINSB05", "SINXB01", "SINBC01", "SINBC02", "SINDI01", "SINDI02"], - ["","S10CB01", "S10CB02", "S10DI01", "S10BD01", "S10CB03", "S10CB04", "S10CB05", "S10CB06", "S10CB08", "S10CB09", "S10BC01", "S10BC02", "S10MA01"], - ["","S20CB01", "S20CB02", "S20CB03", "S20CB04", "S20SY01", "S20SY02", "S20SY03"], - ["","S30CB01", "S30CB02", "S20CB03", "S30CB04", "S30CB05", "S30CB06", "S30CB07", "S30CB08", "S30CB09", "S30CB10", "S30CB11", "S30CB12", "S30CB13", "S30CB14", "S30CB15", "S30CB16"], - ["","SARCL01", "SARCL02", "SARMA01", "SARMA02", "SARUN01", "SARUN02", "SARUN03", "SARUN04", "SARUN05", "SARUN06", "SARUN07", "SARUN08", "SARUN09", "SARUN10", "SARUN11", "SARUN12", - "SARUN13", "SARUN14", "SARUN15", "SARUN16", "SARUN17", "SARUN18", "SARUN19", "SARUN20", "SARBD01", "SARBD02"], - ["","SARFE10 (Gas detector)", "SAROP11 (ESA / ALVRA)", "SAROP21 (ESB / Bernina)", "SAROP31 (ESC)"], - ["","SATSY01", "SATSY02", "SATSY03", "SATCL01", "SATDI01", "SATCB01", "SATCB02", "SATMA01", "SATUN01", "SATUN02", "SATUN03", "SATUN04", "SATUN05", "SATUN06", "SATUN07", "SATUN08", - "SATUN09", "SATUN10", "SATDI04", "SATUN11", "SATUN12", "SATUN13", "SATUN14", "SATUN15", "SATUN16", "SATUN17", "SATUN18", "SATUN19", "SATUN20", "SATUN21", "SATUN22", "SATBD01", "SATBD02"], - ["","SATFE10", "SATOP1"] - ] - }, - "stdlog": { - "destination": "/afs/psi.ch/intranet/Controls/tmp/bdbase/stdlog/" - }, - "screenshot": { - "destination": "/afs/psi.ch/intranet/Controls/tmp/bdbase/screenshot/" - }, - "url": { - "archiver" : "https://ui-data-api.psi.ch/prepare?channel=sf-archiverappliance/", - "databuffer": "https://ui-data-api.psi.ch/prepare?channel=sf-databuffer/" - }, - "OpMsg":{ - "pvDate1" :"SF-OP:CR-MSG:OP-DATE1", - "pvMsg1" :"SF-OP:CR-MSG:OP-MSG1", - "pvBeamOK":"SFTEST-CVME-TI3-EVR0:BUNCH-1-OK" - }, - "BS":{ - "pvFreqSel":"SWISSFEL-STATUS:Bunch-1-Freq-Sel", - "pvFreqRB" :"SWISSFEL-STATUS:Bunch-1-Appl-Freq-RB", - "modulo": 10, - "offset": 0, - "timeoutMS":1000 - }, - "Aramis":{ - "laser":"SWISSFEL-STATUS:Bunch-1-Las-Appl-RB", - "pvFreqRB":"SIN-TIMAST-TMA:Bunch-1-Appl-Freq-RB", - "beamStatus":"SOP-BEAMSTATUS-AR", - "energy" : "SARBD02-DBPM040:ENERGY-OP", - "charge": "SINEG01-DICT215:B1_CHARGE-OP", - "photonEnergy": "SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-AVG" - }, - "Athos":{ - "laser":"SWISSFEL-STATUS:Bunch-2-Las-Appl-RB", - "pvFreqRB":"SIN-TIMAST-TMA:Bunch-2-Appl-Freq-RB", - "beamStatus":"SOP-BEAMSTATUS-AT", - "energy" : "SATBD02-DBPM040:ENERGY-OP", - "charge": "SINEG01-DICT215:B2_CHARGE-OP", - "photonEnergy": "SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG" - }, - "Update":{ - "freq": [0.5, 1, 2, 5, 10], - "defaultIdx": 1 - }, - "DAQ":{ - "caWaitSec": 0.09 - }, - "MsgSeverity": { - "fatal": "#ee0011", - "error": "#990033", - "warn": "#cc6600", - "info": "#0040ff", - "debug": "#11aaee" - }, - "StyleGuide":{ - "fgAlarmInvalid": "#ffffff", - "fgAlarmMajor": "#ff0000", - "fgAlarmMinor": "#fbfb04", - "fgAlarmNoAlarm": "#00cd00", - "fgNormalText": "#000000", - "fgCurveHor": "#2a63e4", - "fgCurveVer": "#8b1a96", - "fgCurveLong": "#cd6100", - "bgTitleOperation": "#dadada", - "bgTitleExpert": "#646464", - "bgTitleSimulation":"#8b1a96", - "bgMain": "#ececec", - "bgReadbackAlarm": "#c8c8c8", - "bgReadback" : "#ffffe0", - "bgPVSetBeam": "#d4db9d", - "bgPVSet": "#a0a0a0", - "bgButtonWindow": "#b79d5c", - "bgGroupContainers":"#e1e1e1", - "bgErrorLogFile" : "#f0f0f8", - "aramis_color": "#00b7eb", - "athos_color": "#2e5894", - "aramis_qlingrad": "qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #00b7eb , stop: 1 #ffffff)", - "athos_qlingrad": "qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #2e5894 , stop: 1 #ffffff)" - }, - "h5": { - "groups":["General/Created","General/Author","General/Process","General/UID","General/Filepath", - "Machine/Charge", "Machine/Laser","Machine/RepetitionRate","Machine/BeamDestination","Machine/Energy", - "Method/Method","Method/Sensors","Method/Actuators","Method/TimeRecordLength","Method/Background", - "Data"] - }, - "h5Machine": { - "charge": "SINEG01-DICT215:B1_CHARGE_AVERAGE-OP", - "laser": "SLG-LGEN:WHICH_LASER", - "repRate": "SIN-TIMAST-TMA:Beam-Appl-Freq-RB", - "beamDest": "SF:MODE_AR", - "energy": "SF:ENERGY_AR" - }, - "h5Data": { - "dataSet": ["timestamp2","data2", "pulse_id2", "timestamp_offset2"] - }, - "test":{ - "test": 2 - } -}