diff --git a/src/PilTrigger.py b/src/PilTrigger.py index 2123ec8a955aa9612f75739071341f9d323d748a..467cb53b27339abde14676a1a87b4cae9051d9d9 100644 --- a/src/PilTrigger.py +++ b/src/PilTrigger.py @@ -13,35 +13,44 @@ nomecartella = '/home/lfo/data/salvatutto/PIL_trigger/' os.chdir(nomecartella) defaultreffile = 'auto' +app = QApplication([]) +font_importante = QFont("Arial", 14, 1, True) +font_pannello = QFont("Arial", 12, -1, False) +app.setFont(font_pannello) + +# creo device proxy +try: + global devicetrgEVR + devicetrgEVR = PyTango.DeviceProxy('srv-tango-srf-01:20000/ec-pil-plpsr-01/evr/ff100000') + devicetrgEVR.State() +except: + msgBox = QMessageBox() + msgBox.setIcon(QMessageBox.Critical) + msgBox.setText("ec-pil-plpsr-01/evr/ff100000 is not working, fix the problem and restat the panel") + msgBox.exec_() +try: + global devicetrgDGQ + devicetrgDGQ = PyTango.DeviceProxy('srv-tango-srf-01:20000/pil/delay/dgq_pil.01') + devicetrgDGQ.State() +except: + msgBox = QMessageBox() + msgBox.setIcon(QMessageBox.Critical) + msgBox.setText("pil/delay/dgq_pil.01 is not working, fix the problem and restat the panel") + msgBox.exec_() +try: + global devicetrgSDG + devicetrgSDG = PyTango.DeviceProxy('srv-tango-srf-01:20000/pil/delay/sdg_pil.01') + devicetrgSDG.State() +except: + msgBox = QMessageBox() + msgBox.setIcon(QMessageBox.Critical) + msgBox.setText("pil/delay/sdg_pil.01 is not working, fix the problem and restat the panel") + msgBox.exec_() class MainWindow(QDialog): def __init__(self, parent = None): super(MainWindow, self).__init__(parent) - # creo device proxy - try: - global devicetrgEVR - devicetrgEVR = PyTango.DeviceProxy('srv-tango-srf-01:20000/ec-pil-plpsr-01/evr/ff100000') - except: - msgBox = QMessageBox() - msgBox.setIcon(QMessageBox.Critical) - msgBox.setText("ec-pil-plpsr-01/evr/ff100000 is not working, fix the problem and restat the panel") - msgBox.exec_() - try: - global devicetrgDGQ - devicetrgDGQ = PyTango.DeviceProxy('srv-tango-srf-01:20000/pil/delay/dgq_pil.01') - except: - msgBox = QMessageBox() - msgBox.setIcon(QMessageBox.Critical) - msgBox.setText("pil/delay/dgq_pil.01 is not working, fix the problem and restat the panel") - msgBox.exec_() - try: - global devicetrgSDG - devicetrgSDG = PyTango.DeviceProxy('srv-tango-srf-01:20000/pil/delay/sdg_pil.01') - except: - msgBox = QMessageBox() - msgBox.setIcon(QMessageBox.Critical) - msgBox.setText("pil/delay/sdg_pil.01 is not working, fix the problem and restat the panel") - msgBox.exec_() + #canali self.scialuppa = [] self.riga0 = canaleEVR('PIL MASTER', devicetrgEVR, 0, 'Shift all the signals') @@ -635,10 +644,6 @@ class titolicanali(QWidget): self.setLayout(layoutriga) -app = QApplication([]) -font_importante = QFont("Arial", 14, 1, True) -font_pannello = QFont("Arial", 12, -1, False) -app.setFont(font_pannello) main = MainWindow() main.show() app.exec_()