# load DIRC module scalers # # V. Kakoyan Sept 2018 # from org.csstudio.opibuilder.scriptUtil import PVUtil from org.csstudio.opibuilder.scriptUtil import WidgetUtil from org.csstudio.opibuilder.scriptUtil import ConsoleUtil from org.csstudio.utility.pv import PVFactory from org.csstudio.opibuilder.scriptUtil import ColorFontUtil import re import os import time import sys #ConsoleUtil.writeInfo(" ****DIRC scalers MODULE LOADER **** ") linkingContainer = [] Arr=[] Pref= widget.getParent().getMacroValue("pref") NS = widget.getParent().getMacroValue("NS") ns = widget.getParent().getMacroValue("ns") RowNumber = widget.getParent().getMacroValue("rowNumber") NN = widget.getParent().getMacroValue("nn") Column = widget.getParent().getMacroValue("col") #Modules = widget.getParent().getMacroValue("modules") wdg=widget.getParent().getParent().getParent().getParent().getParent().getWidget("Module_scalers") #ConsoleUtil.writeInfo("wdg = " + str(wdg)) wdg.removeAllChildren() linkingContainer.append( WidgetUtil.createWidgetModel("org.csstudio.opibuilder.widgets.linkingContainer") ) linkingContainer[0].setPropertyValue("opi_file", "DIRC_moduleScalers.opi") #create linking container linkingContainer[0].setPropertyValue("auto_size", True) linkingContainer[0].setPropertyValue("zoom_to_fit", False) linkingContainer[0].setPropertyValue("border_style", 0) #add macros linkingContainer[0].addMacro("NS", NS) linkingContainer[0].addMacro("rowNumber", RowNumber) linkingContainer[0].addMacro("col", Column) linkingContainer[0].addMacro("nn", NN) linkingContainer[0].addMacro("ns", ns) wdg.addChildToBottom(linkingContainer[0]) wdg.performAutosize()