CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController Class Reference
Inheritance diagram for Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController:
Vispa.Plugins.Browser.BrowserTabController.BrowserTabController Vispa.Main.TabController.TabController

Public Member Functions

def __init__
 
def activated
 
def applyButtonClicked
 
def chooseEditor
 
def codeSelected
 
def dotExportAction
 
def dumpPython
 
def eventContent
 
def exportDot
 
def history
 
def importButtonClicked
 
def importConfig
 
def loadIni
 
def maximizeEditor
 
def minimizeEditor
 
def onCenterViewDoubleClicked
 
def onSelected
 
def open
 
def openEditor
 
def originalEditor
 
def readFile
 
def refresh
 
def removeButtonClicked
 
def save
 
def saveIni
 
def scriptChanged
 
def select
 
def selectDataAccessor
 
def startEditMode
 
def staticSupportedFileTypes
 
def toolDataAccessor
 
def updateCenterView
 
def updateConfigHighlight
 
def updateContent
 
def updateViewMenu
 
def valueChanged
 
def writeFile
 
- Public Member Functions inherited from Vispa.Plugins.Browser.BrowserTabController.BrowserTabController
def __init__
 
def activated
 
def boxContentDialog
 
def cancel
 
def centerView
 
def centerViewMenuButtonClicked
 
def close
 
def currentCenterViewClassId
 
def dataAccessor
 
def enableCenterViewSelectionMenu
 
def filter
 
def filterDialog
 
def filtered
 
def find
 
def isBusy
 
def loadIni
 
def onSelected
 
def onTreeViewSelected
 
def saveImage
 
def saveIni
 
def scriptChanged
 
def select
 
def setDataAccessor
 
def setEditable
 
def setTab
 
def setZoom
 
def showBoxContentDialog
 
def switchCenterView
 
def treeViewMenuButtonClicked
 
def updateCenterView
 
def updateContent
 
def updateTreeView
 
def updateViewMenu
 
def zoom
 
- Public Member Functions inherited from Vispa.Main.TabController.TabController
def __init__
 
def activated
 
def addUndoEvent
 
def allowClose
 
def allowSelectAll
 
def cancel
 
def checkModificationTimestamp
 
def close
 
def copy
 
def cut
 
def dumpUndoEvents
 
def enableUndo
 
def filename
 
def find
 
def getFileBasename
 
def isCopyPasteEnabled
 
def isEditable
 
def isFindEnabled
 
def isModified
 
def open
 
def paste
 
def plugin
 
def readFile
 
def redo
 
def redoEvents
 
def refresh
 
def resetZoomButtonPressedBefore
 
def save
 
def selectAll
 
def setAllowSelectAll
 
def setCopyPasteEnabled
 
def setEditable
 
def setFilename
 
def setFindEnabled
 
def setLastSavedStateEvent
 
def setModified
 
def setTab
 
def setZoom
 
def staticSupportedFileTypes
 
def supportedFileFilters
 
def supportedFileTypes
 
def supportsUndo
 
def tab
 
def undo
 
def undoEvents
 
def updateContent
 
def updateLabel
 
def writeFile
 
def zoom
 
def zoomAll
 
def zoomChanged
 
def zoomDialog
 
def zoomHundred
 
def zoomUser
 

Static Public Attributes

tuple staticSupportedFileTypes = staticmethod(staticSupportedFileTypes)
 
- Static Public Attributes inherited from Vispa.Main.TabController.TabController
tuple staticSupportedFileTypes = staticmethod(staticSupportedFileTypes)
 
int TAB_LABEL_MAX_LENGTH = 20
 

Private Member Functions

def _updateCode
 

Private Attributes

 _applyPatToolAction
 
 _configMenu
 
 _configToolBar
 
 _dotExportAction
 
 _dumpAction
 
 _editorAction
 
 _editorName
 
 _eventContentAction
 
 _historyAction
 
 _importAction
 
 _originalSizes
 
 _thread
 
 _toolDataAccessor
 
 _toolDialog
 
 _updateCenterView
 

Detailed Description

 

Definition at line 36 of file ConfigEditorTabController.py.

Constructor & Destructor Documentation

def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.__init__ (   self,
  plugin 
)

Definition at line 39 of file ConfigEditorTabController.py.

39 
40  def __init__(self, plugin):
41  logging.debug(__name__ + ": __init__")
42  BrowserTabController.__init__(self, plugin)
43 
44  self._editorName = ""
45  self._thread = None
46  self._originalSizes=[100,1,200]
47  self._toolDialog=None
48  self._updateCenterView=False
49  self.setEditable(False)
50 
51  self._configMenu = self.plugin().application().createPluginMenu('&Config')
52  self._configToolBar = self.plugin().application().createPluginToolBar('&Config')
53  openEditorAction = self.plugin().application().createAction('&Open in custom editor', self.openEditor, "F6")
54  self._configMenu.addAction(openEditorAction)
55  chooseEditorAction = self.plugin().application().createAction('&Choose custom editor...', self.chooseEditor, "Ctrl+T")
56  self._configMenu.addAction(chooseEditorAction)
57  self._configMenu.addSeparator()
58  self._dumpAction = self.plugin().application().createAction('&Dump python config to single file...', self.dumpPython, "Ctrl+D")
59  self._configMenu.addAction(self._dumpAction)
60  self._dotExportAction = self.plugin().application().createAction('&Export dot graphic...', self.exportDot, "Ctrl+G")
61  self._configMenu.addAction(self._dotExportAction)
62  self._historyAction = self.plugin().application().createAction('&Show history...', self.history, "Ctrl+H")
63  self._configMenu.addAction(self._historyAction)
64  self._eventContentAction = self.plugin().application().createAction('&Browse event content...', self.eventContent, "Ctrl+Shift+C")
65  self._configMenu.addAction(self._eventContentAction)
66  self._configMenu.addSeparator()
67  self._editorAction = self.plugin().application().createAction('&Edit using ConfigEditor', self.startEditMode, "F8")
68  self._configMenu.addAction(self._editorAction)
69  self._configToolBar.addAction(self._editorAction)

Member Function Documentation

def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCode (   self,
  propertyView = True 
)
private

Definition at line 406 of file ConfigEditorTabController.py.

References Vispa.Main.TabController.TabController.tab(), RawParticle.tab, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor(), Vispa.Main.TabController.TabController.updateContent(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateContent().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.applyButtonClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.importConfig(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.removeButtonClicked(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.valueChanged().

407  def _updateCode(self,propertyView=True):
408  logging.debug(__name__ + ": _updateCode")
409  self.tab().propertyView().setEnabled(False)
410  self.toolDataAccessor().updateToolList()
411  self.tab().editorTableView().setDataObjects(self.toolDataAccessor().topLevelObjects())
412  if self.tab().editorTableView().updateContent():
413  self.tab().editorTableView().restoreSelection()
414  self.updateContent(False,propertyView)
415  self.tab().propertyView().setEnabled(True)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.activated (   self)
Shows plugin menus when user selects tab.

Definition at line 142 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._configMenu, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._configToolBar, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), LaserDQM_cfg.process, Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

143  def activated(self):
144  """ Shows plugin menus when user selects tab.
145  """
146  logging.debug(__name__ + ": activated()")
147  BrowserTabController.activated(self)
148  self.plugin().application().showPluginMenu(self._configMenu)
149  self.plugin().application().showPluginToolBar(self._configToolBar)
150  self._editorAction.setVisible(not self.tab().editorSplitter())
151  if self.tab().editorSplitter():
152  self._applyPatToolAction.setVisible(self.dataAccessor().process()!=None)
153  self.tab().mainWindow().application().showZoomToolBar()
tuple process
Definition: LaserDQM_cfg.py:3
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.applyButtonClicked (   self)

Definition at line 459 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._toolDataAccessor, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._toolDialog, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCode(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.codeSelected(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.select(), Vispa.Main.TabController.TabController.setModified(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor().

460  def applyButtonClicked(self):
461  logging.debug(__name__ + ": applyButtonClicked")
462  if not self._toolDialog:
463  self._toolDialog=ToolDialog()
464  self._toolDialog.setDataAccessor(self._toolDataAccessor)
465  if not self._toolDialog.exec_():
466  return
467  if not self.toolDataAccessor().addTool(self._toolDialog.tool()):
468  return
469  self.setModified(True)
470  self._updateCode()
471  self.tab().editorTableView().select(self.tab().editorTableView().dataObjects()[-2])
472  self.codeSelected(self.tab().editorTableView().dataObjects()[-2])
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.chooseEditor (   self,
  _editorName = "" 
)
Choose editor using FileDialog 

Definition at line 167 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._editorName, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.saveIni(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

168  def chooseEditor(self, _editorName=""):
169  """ Choose editor using FileDialog """
170  logging.debug(__name__ + ": chooseEditor")
171  if _editorName == "":
172  _editorName = str(QFileDialog.getSaveFileName(self.tab(), "Choose editor", self._editorName, "Editor (*)", None , QFileDialog.DontConfirmOverwrite or QFileDialog.DontResolveSymlinks))
173  if not os.path.exists(_editorName):
174  _editorName = os.path.basename(_editorName)
175  if _editorName != None and _editorName != "":
176  self._editorName = _editorName
177  self.saveIni()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.codeSelected (   self,
  select 
)

Definition at line 511 of file ConfigEditorTabController.py.

References PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.setDataAccessor(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateConfigHighlight(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateContent().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.applyButtonClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.removeButtonClicked(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.valueChanged().

512  def codeSelected(self,select):
513  if self.tab().propertyView().dataObject() != select:
514  statusMessage = self.plugin().application().startWorking("Updating property view")
515  self.tab().propertyView().setDataAccessor(self.toolDataAccessor())
516  self.tab().propertyView().setDataObject(select)
517  self.tab().propertyView().updateContent()
518  self.plugin().application().stopWorking(statusMessage)
519  self.updateConfigHighlight()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.dotExportAction (   self)

Definition at line 77 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._dotExportAction.

77 
78  def dotExportAction(self):
79  return self._dotExportAction
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.dumpPython (   self,
  fileName = None 
)
Dump python configuration to file 

Definition at line 178 of file ConfigEditorTabController.py.

References Vispa.Main.TabController.TabController._filename, DQMIO2histo.DQMIO._filename, MuonGeometryArrange._filename, TrackerGeometryCompare._filename, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.open(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, and pileupCalc.upper.

Referenced by Mixins._Parameterizable.__addParameter(), Mixins._ParameterTypeBase.__repr__(), Mixins._Parameterizable.__repr__(), Mixins._ValidatingParameterListBase.__repr__(), Types.VPSet.__repr__(), Mixins._Parameterizable.__setattr__(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.writeFile().

179  def dumpPython(self, fileName=None):
180  """ Dump python configuration to file """
181  logging.debug(__name__ + ": dumpPython")
182  dump = self.dataAccessor().dumpPython()
183  if dump == None:
184  logging.error(self.__class__.__name__ +": dumpPython() - "+"Cannot dump this config because it does not contain a 'process'.\nNote that only 'cfg' files contain a 'process'.")
185  self.plugin().application().errorMessage("Cannot dump this config because it does not contain a 'process'.\nNote that only 'cfg' files contain a 'process'.")
186  return None
187  filter = QString("")
188  if not fileName:
189  defaultname = os.path.splitext(self._filename)[0] + "_dump" + os.path.splitext(self._filename)[1]
190  fileName = str(QFileDialog.getSaveFileName(self.tab(), "Save python config...", defaultname, "Python config (*.py)", filter))
191  if fileName != "":
192  name = fileName
193  ext = "PY"
194  if os.path.splitext(fileName)[1].upper().strip(".") == ext:
195  name = os.path.splitext(fileName)[0]
196  ext = os.path.splitext(fileName)[1].upper().strip(".")
197  text_file = open(name + "." + ext.lower(), "w")
198  text_file.write(dump)
199  text_file.close()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.eventContent (   self)
Open event content dialog 

Definition at line 211 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

212  def eventContent(self):
213  """ Open event content dialog """
214  logging.debug(__name__ + ": eventContent")
215  if event_content_error!=None:
216  logging.error(__name__ + ": Could not import EventContentDialog: "+event_content_error[1])
217  self.plugin().application().errorMessage("Could not import EventContentDialog (see logfile for details):\n"+event_content_error[0])
218  return
219  dialog=EventContentDialog(self.tab(),"This dialog let's you check if the input needed by your configuration file is in a dataformat or edm root file. You can compare either to a dataformat definition from a txt file (e.g. RECO_3_3_0) or any edm root file by selecting an input file.\n\nBranches that are used as input by your configuration but not present in the dataformat or file are marked in red.\nBranches that are newly created by your configuration are marked in green.")
220  dialog.setConfigDataAccessor(self.dataAccessor())
221  dialog.exec_()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.exportDot (   self,
  fileName = None 
)

Definition at line 254 of file ConfigEditorTabController.py.

References Vispa.Main.TabController.TabController._filename, DQMIO2histo.DQMIO._filename, MuonGeometryArrange._filename, TrackerGeometryCompare._filename, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.currentCenterViewClassId(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Main.Exceptions.exception_traceback(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), split, Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

255  def exportDot(self, fileName=None):
256  if import_dotexport_error!=None:
257  logging.error(__name__ + ": Could not import DOTExport: "+import_dotexport_error[1])
258  self.plugin().application().errorMessage("Could not import DOTExport (see logfile for details):\n"+import_dotexport_error[0])
259  return
260  dot = DotExport()
261  if self.currentCenterViewClassId() == self.plugin().viewClassId(ConnectionStructureView):
262  presets = {'seqconnect':False, 'tagconnect':True, 'seq':False, 'services':False, 'es':False, 'endpath':True, 'source':True, 'legend':False}
263  else:
264  presets = {'seqconnect':True, 'tagconnect':False, 'seq':True, 'services':False, 'es':False, 'endpath':True, 'source':True, 'legend':False}
265  for opt, val in presets.items():
266  dot.setOption(opt, val)
267  types = ""
268  for ft in dot.file_types:
269  if types != "":
270  types += ";;"
271  types += ft.upper() + " File (*." + ft.lower() + ")"
272  filter = QString("PDF File (*.pdf)")
273  if not fileName:
274  defaultname = os.path.splitext(self._filename)[0] + "_export"
275  fileName = str(QFileDialog.getSaveFileName(self.tab(), "Export dot graphic...", defaultname, types, filter))
276  if fileName != "":
277  name = fileName
278  ext = str(filter).split(" ")[0].lower()
279  if os.path.splitext(fileName)[1].lower().strip(".") in dot.file_types:
280  name = os.path.splitext(fileName)[0]
281  ext = os.path.splitext(fileName)[1].lower().strip(".")
282  try:
283  dot.export(self.dataAccessor(), name + "." + ext, ext)
284  except Exception:
285  try:
286  dot.export(self.dataAccessor(), name + ".dot", "dot")
287  logging.error(self.__class__.__name__ +": exportDot() - "+"'dot' executable not found which is needed for conversion to '*." + ext + "'. Created '*.dot' file instead.")
288  self.plugin().application().errorMessage("'dot' executable not found which is needed for conversion to '*." + ext + "'. Created '*.dot' file instead.")
289  except Exception,e:
290  logging.error(self.__class__.__name__ +": exportDot() - "+"Could not export dot graphic (see logfile for details): " + str(e))
291  self.plugin().application().errorMessage("Could not export dot graphic: " + exception_traceback())
double split
Definition: MVATrainer.cc:139
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.history (   self)
Show config history 

Definition at line 200 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

201  def history(self):
202  """ Show config history """
203  logging.debug(__name__ + ": history")
204  history = self.dataAccessor().history()
205  if history == None:
206  logging.error(self.__class__.__name__ +": history() - "+"Cannot show config history because it does not contain a 'process'.\nNote that only 'cfg' files contain a 'process'.")
207  self.plugin().application().errorMessage("Cannot show config history because it does not contain 'process'.\nNote that only 'cfg' files contain a 'process'.")
208  return None
209  dialog=TextDialog(self.tab(), "Configuration history", history, True, "This window lists the parameter changes and tools applied in this configuration file before it was loaded into ConfigEditor.")
210  dialog.exec_()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.importButtonClicked (   self)

Definition at line 452 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.importConfig(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

453  def importButtonClicked(self):
454  logging.debug(__name__ + ": importButtonClicked")
455  filename = QFileDialog.getOpenFileName(
456  self.tab(),'Select a configuration file',standardConfigDir,"Python configuration (*.py)")
457  if not filename.isEmpty():
458  self.importConfig(str(filename))
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.importConfig (   self,
  filename 
)

Definition at line 416 of file ConfigEditorTabController.py.

References Vispa.Main.TabController.TabController._filename, DQMIO2histo.DQMIO._filename, MuonGeometryArrange._filename, TrackerGeometryCompare._filename, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCode(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Main.Exceptions.exception_traceback(), AlignmentCorrelationsIO.open(), AlignmentCorrelationsIORoot.open(), AlignableDataIORoot.open(), AlignmentParametersIO.open(), AlignableDataIO.open(), AlignmentUserVariablesIO.open(), AlignmentParametersIORoot.open(), HIPUserVariablesIORoot.open(), PFCandIsolatorFromDeposits::SingleDeposit.open(), cond::persistency::PayloadReader.open(), MillePedeVariablesIORoot.open(), cond::DbSession.open(), L1TriggerLutFile.open(), cond::SessionImpl.open(), dqmservices::DQMFileIterator.open(), dqmservices::DQMStreamerReader::OpenFile.open(), ora::DatabaseSession.open(), options.HLTProcessOptions.open, ora::Database.open(), Vispa.Main.TabController.TabController.open(), DQMStore.open(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), LaserDQM_cfg.process, Vispa.Main.TabController.TabController.setFilename(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor(), and Vispa.Main.TabController.TabController.updateLabel().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.importButtonClicked(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.valueChanged().

417  def importConfig(self,filename):
418  logging.debug(__name__ + ": importConfig")
419  statusMessage = self.plugin().application().startWorking("Import python configuration in Editor")
420  try:
421  good=self.open(filename,False)
422  except:
423  logging.error(__name__ + ": Could not open configuration file: "+exception_traceback())
424  self.plugin().application().errorMessage("Could not open configuration file (see log file for details).")
425  self.plugin().application().stopWorking(statusMessage,"failed")
426  return False
427  if not good:
428  logging.error(__name__ + ": Could not open configuration file.")
429  self.plugin().application().errorMessage("Could not open configuration file.")
430  self.plugin().application().stopWorking(statusMessage,"failed")
431  return False
432  if not self.dataAccessor().process():
433  logging.error(__name__ + ": Config does not contain a process and cannot be edited using ConfigEditor.")
434  self.plugin().application().errorMessage("Config does not contain a process and cannot be edited using ConfigEditor.")
435  self.plugin().application().stopWorking(statusMessage,"failed")
436  return False
437  if self._filename and not self.dataAccessor().isReplaceConfig():
438  self.setFilename(None)
439  self.updateLabel()
440  self.toolDataAccessor().setConfigDataAccessor(self.dataAccessor())
441  self.tab().propertyView().setDataObject(None)
442  self._updateCode()
443  self._applyPatToolAction.setVisible(True)
444  self.plugin().application().stopWorking(statusMessage)
445  return True
tuple process
Definition: LaserDQM_cfg.py:3
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.loadIni (   self)
read options from ini 

Definition at line 222 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._editorName, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.centerView(), Vispa.Plugins.Browser.BrowserTab.BrowserTab.centerView(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.switchCenterView().

223  def loadIni(self):
224  """ read options from ini """
225  ini = self.plugin().application().ini()
226  if ini.has_option("config", "editor"):
227  self._editorName = str(ini.get("config", "editor"))
228  else:
229  self._editorName = "emacs"
230  if ini.has_option("config", "CurrentView"):
231  proposed_view = ini.get("config", "CurrentView")
232  else:
233  proposed_view = self.plugin().viewClassId(ConnectionStructureView)
234  self.switchCenterView(proposed_view)
235  if ini.has_option("config", "box content script") and isinstance(self.centerView(),ConfigEditorBoxView):
236  self.centerView().setBoxContentScript(str(ini.get("config", "box content script")))
237  self._boxContentDialog.setScript(str(ini.get("config", "box content script")))
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.maximizeEditor (   self)

Definition at line 398 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._originalSizes, Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

399  def maximizeEditor(self):
400  if self.tab().originalButton().isChecked():
401  self._originalSizes=self.tab().verticalSplitter().sizes()
402  self.tab().minimizeButton().setChecked(False)
403  self.tab().originalButton().setChecked(False)
404  self.tab().maximizeButton().setChecked(True)
405  self.tab().verticalSplitter().setSizes([0, 1, 100])
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.minimizeEditor (   self)

Definition at line 384 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._originalSizes, Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

385  def minimizeEditor(self):
386  if self.tab().originalButton().isChecked():
387  self._originalSizes=self.tab().verticalSplitter().sizes()
388  self.tab().minimizeButton().setChecked(True)
389  self.tab().originalButton().setChecked(False)
390  self.tab().maximizeButton().setChecked(False)
391  self.tab().verticalSplitter().setSizes([100, 1, 0])
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.onCenterViewDoubleClicked (   self,
  object 
)

Definition at line 85 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.onTreeViewSelected(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.select(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateViewMenu().

85 
86  def onCenterViewDoubleClicked(self,object):
87  logging.debug(__name__ + ": onCenterViewDoubleClicked()")
88  self.tab().treeView().select(object)
89  self.onTreeViewSelected(object)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.onSelected (   self,
  select 
)

Definition at line 486 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.selectDataAccessor().

Referenced by Vispa.Views.LineDecayView.LineDecayView.createLineDecayContainer().

487  def onSelected(self, select):
488  self.selectDataAccessor(select)
489  BrowserTabController.onSelected(self, select)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.open (   self,
  filename = None,
  update = True 
)

Definition at line 337 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.startEditMode().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.dumpPython(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.readFile(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.writeFile().

338  def open(self, filename=None, update=True):
339  if BrowserTabController.open(self, filename, update):
340  if self.dataAccessor().isReplaceConfig():
341  self.startEditMode()
342  return True
343  return False
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.openEditor (   self)
Call editor 

Definition at line 154 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._editorName, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

155  def openEditor(self):
156  """ Call editor """
157  logging.debug(__name__ + ": openEditor")
158  selected_object = self.tab().propertyView().dataObject()
159  filename = self.dataAccessor().fullFilename(selected_object)
160  if self._editorName != "" and selected_object != None and os.path.exists(filename):
161  if os.path.expandvars("$CMSSW_RELEASE_BASE") in filename:
162  QMessageBox.information(self.tab(), "Opening readonly file...", "This file is from $CMSSW_RELEASE_BASE and readonly")
163  command = self._editorName
164  command += " " + filename
165  command += " &"
166  os.system(command)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.originalEditor (   self)

Definition at line 392 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._originalSizes, Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

393  def originalEditor(self):
394  self.tab().minimizeButton().setChecked(False)
395  self.tab().originalButton().setChecked(True)
396  self.tab().maximizeButton().setChecked(False)
397  self.tab().verticalSplitter().setSizes(self._originalSizes)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.readFile (   self,
  filename 
)
Reads in the file in a separate thread.

Definition at line 292 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCenterView, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.centerView(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.open(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), LaserDQM_cfg.process, CmsShowViewPopup.saveImage(), Vispa.Plugins.Browser.BrowserPlugin.BrowserPlugin.saveImage(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.saveImage(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

293  def readFile(self, filename):
294  """ Reads in the file in a separate thread.
295  """
296  self._updateCenterView=False
297  if self.dataAccessor().open(filename):
298  self._dumpAction.setEnabled(self.dataAccessor().process()!=None)
299  self._historyAction.setEnabled(self.dataAccessor().process()!=None)
300  self._eventContentAction.setEnabled(self.dataAccessor().process()!=None)
301  self._editorAction.setEnabled(self.dataAccessor().process()!=None)
302  if self.plugin().application().commandLineOptions().saveimage:
303  self.tab().centerView().updateConnections()
304  self.saveImage(self.plugin().application().commandLineOptions().saveimage)
305  print "Saved image to", self.plugin().application().commandLineOptions().saveimage, "."
306  sys.exit(2)
307  return True
308  return False
tuple process
Definition: LaserDQM_cfg.py:3
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.refresh (   self)

Definition at line 490 of file ConfigEditorTabController.py.

References Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

491  def refresh(self):
492  self.tab().propertyView().setDataObject(None)
493  BrowserTabController.refresh(self)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.removeButtonClicked (   self,
  object 
)

Definition at line 473 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCode(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.codeSelected(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), LaserDQM_cfg.process, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.select(), Vispa.Main.TabController.TabController.setModified(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor().

474  def removeButtonClicked(self,object):
475  logging.debug(__name__ + ": removeButtonClicked")
476  if not object or not self.dataAccessor().process() or\
477  self._toolDataAccessor.label(object) in ["Import","ApplyTool"]:
478  return
479  if not self.toolDataAccessor().removeTool(object):
480  self.plugin().application().errorMessage("Could not apply tool. See log file for details.")
481  return
482  self.setModified(True)
483  self._updateCode()
484  self.tab().editorTableView().select(self.tab().editorTableView().dataObjects()[-1])
485  self.codeSelected(self.tab().editorTableView().dataObjects()[-1])
tuple process
Definition: LaserDQM_cfg.py:3
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.save (   self,
  filename = '' 
)

Definition at line 309 of file ConfigEditorTabController.py.

References HDQMDatabaseProducer.configFile, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.startEditMode(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

310  def save(self, filename=''):
311  logging.debug(__name__ + ': save')
312  self.startEditMode()
313  if filename != "":
314  if os.path.basename(filename) == os.path.basename(self.dataAccessor().configFile()):
315  logging.error(self.__class__.__name__ +": save() - "+"Cannot use name of original configuration file: "+str(filename))
316  self.plugin().application().errorMessage("Cannot use name of original configuration file.")
317  elif BrowserTabController.save(self, filename):
318  self.dataAccessor().setIsReplaceConfig()
319  return True
320  else:
321  return False
322  elif self.dataAccessor().isReplaceConfig():
323  return BrowserTabController.save(self, filename)
324  return self.tab().mainWindow().application().saveFileAsDialog()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.saveIni (   self)
write options to ini 

Definition at line 242 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._editorName, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.centerView(), Vispa.Plugins.Browser.BrowserTab.BrowserTab.centerView(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.currentCenterViewClassId(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), and Vispa.Main.Application.Application.plugin().

243  def saveIni(self):
244  """ write options to ini """
245  ini = self.plugin().application().ini()
246  if not ini.has_section("config"):
247  ini.add_section("config")
248  ini.set("config", "editor", self._editorName)
249  if self.currentCenterViewClassId():
250  ini.set("config", "CurrentView", self.currentCenterViewClassId())
251  if isinstance(self.centerView(),ConfigEditorBoxView):
252  ini.set("config", "box content script", self.centerView().boxContentScript())
253  self.plugin().application().writeIni()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.scriptChanged (   self,
  script 
)

Definition at line 238 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.saveIni().

239  def scriptChanged(self, script):
240  BrowserTabController.scriptChanged(self, script)
241  self.saveIni()
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.select (   self,
  object 
)

Definition at line 501 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.selectDataAccessor().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.applyButtonClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.onCenterViewDoubleClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.removeButtonClicked(), Vispa.Views.AbstractView.AbstractView.restoreSelection(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateCenterView().

502  def select(self, object):
503  self.selectDataAccessor(object)
504  BrowserTabController.select(self, object)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.selectDataAccessor (   self,
  object 
)

Definition at line 505 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.setDataAccessor(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.onSelected(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.select(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateCenterView().

506  def selectDataAccessor(self,object):
507  if import_tools_error==None and isinstance(object,ConfigToolBase):
508  self.tab().propertyView().setDataAccessor(self.toolDataAccessor())
509  else:
510  self.tab().propertyView().setDataAccessor(self.dataAccessor())
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.startEditMode (   self)

Definition at line 344 of file ConfigEditorTabController.py.

References Vispa.Main.TabController.TabController._filename, DQMIO2histo.DQMIO._filename, MuonGeometryArrange._filename, TrackerGeometryCompare._filename, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._originalSizes, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), LaserDQM_cfg.process, Vispa.Main.TabController.TabController.setEditable(), Vispa.Main.TabController.TabController.setFilename(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, and Vispa.Main.TabController.TabController.updateLabel().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.open(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.save().

345  def startEditMode(self):
346  logging.debug(__name__ + ": startEditMode")
347  if import_tools_error!=None:
348  logging.error(__name__ + ": Could not import tools for ConfigEditor: "+import_tools_error[1])
349  self.plugin().application().errorMessage("Could not import tools for ConfigEditor (see logfile for details):\n"+import_tools_error[0])
350  return
351  if self.tab().editorSplitter():
352  return
353  if self._filename and not self.dataAccessor().process():
354  logging.error(__name__ + ": Config does not contain a process and cannot be edited using ConfigEditor.")
355  self.plugin().application().errorMessage("Config does not contain a process and cannot be edited using ConfigEditor.")
356  return
357  if self._filename and not self.dataAccessor().isReplaceConfig():
358  self.setFilename(None)
359  self.updateLabel()
360  self.tab().createEditor()
361  self.setEditable(True)
362  self.tab().verticalSplitter().setSizes(self._originalSizes)
364  self._importAction = self.plugin().application().createAction('&Import configuration...', self.importButtonClicked, "F2")
365  self._configMenu.addAction(self._importAction)
366  self._configToolBar.addAction(self._importAction)
367  self._applyPatToolAction = self.plugin().application().createAction('&Apply tool...', self.applyButtonClicked, "F3")
368  self._configMenu.addAction(self._applyPatToolAction)
369  self._configToolBar.addAction(self._applyPatToolAction)
370  self.activated()
372  self._toolDataAccessor=ToolDataAccessor()
373  self._toolDataAccessor.setConfigDataAccessor(self.dataAccessor())
374  self.tab().editorTableView().setDataAccessor(self._toolDataAccessor)
375  self.connect(self.tab().editorTableView(), SIGNAL('importButtonClicked'), self.importButtonClicked)
376  self.connect(self.tab().editorTableView(), SIGNAL('applyButtonClicked'), self.applyButtonClicked)
377  self.connect(self.tab().editorTableView(), SIGNAL('removeButtonClicked'), self.removeButtonClicked)
378  self.connect(self.tab().editorTableView(), SIGNAL('selected'), self.codeSelected)
379  self.connect(self.tab().propertyView(), SIGNAL('valueChanged'), self.valueChanged)
380  self._updateCode()
tuple process
Definition: LaserDQM_cfg.py:3
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.staticSupportedFileTypes ( )
Returns supported file type: py.

Definition at line 71 of file ConfigEditorTabController.py.

71 
73  """ Returns supported file type: py.
74  """
return [('py', 'Config file')]
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor (   self)

Definition at line 381 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._toolDataAccessor.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCode(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.applyButtonClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.codeSelected(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.importConfig(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.removeButtonClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.selectDataAccessor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateConfigHighlight(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.valueChanged(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.writeFile().

382  def toolDataAccessor(self):
383  return self._toolDataAccessor
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateCenterView (   self,
  propertyView = True 
)
Fill the center view from an item in the TreeView and update it 

Definition at line 90 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._thread, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCenterView, Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.centerView(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.currentCenterViewClassId(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.plugin, lhef::FastJetAlgorithmWrapper.plugin, Vispa.Main.TabController.TabController.plugin(), Vispa.Main.Application.Application.plugin(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.select(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.selectDataAccessor(), corrVsCorr.selection, Vispa.Main.TabController.TabController.tab(), RawParticle.tab, Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateConfigHighlight(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateContent().

90 
91  def updateCenterView(self, propertyView=True):
92  """ Fill the center view from an item in the TreeView and update it """
93  if not self._updateCenterView:
94  # Do not update the very first time
95  self._updateCenterView=True
96  return
97  statusMessage = self.plugin().application().startWorking("Updating center view")
98  if propertyView:
99  self.selectDataAccessor(True)
100  else:
101  self.selectDataAccessor(self.tab().propertyView().dataObject())
102  if self._thread != None and self._thread.isRunning():
103  self.dataAccessor().cancelOperations()
104  while self._thread.isRunning():
105  if not Application.NO_PROCESS_EVENTS:
106  QCoreApplication.instance().processEvents()
107  objects = []
108  select=self.tab().treeView().selection()
109  if select != None:
110  if self.currentCenterViewClassId() == self.plugin().viewClassId(ConnectionStructureView):
111  self.tab().centerView().setArrangeUsingRelations(True)
112  if self.tab().centerView().checkNumberOfObjects():
113  if self.dataAccessor().isContainer(select):
114  self._thread = ThreadChain(self.dataAccessor().readConnections, [select]+self.dataAccessor().allChildren(select))
115  else:
116  self._thread = ThreadChain(self.dataAccessor().readConnections, [select], True)
117  while self._thread.isRunning():
118  if not Application.NO_PROCESS_EVENTS:
119  QCoreApplication.instance().processEvents()
120  self.tab().centerView().setConnections(self._thread.returnValue())
121  self.tab().centerView().setDataObjects(self.dataAccessor().nonSequenceChildren(select))
122  else:
123  self.tab().centerView().setDataObjects([])
124  elif self.currentCenterViewClassId() == self.plugin().viewClassId(SequenceStructureView):
125  self.tab().centerView().setArrangeUsingRelations(False)
126  self.tab().centerView().setDataObjects([select])
127  self.tab().centerView().setConnections({})
128  if (self.currentCenterViewClassId() == self.plugin().viewClassId(ConnectionStructureView) or self.currentCenterViewClassId() == self.plugin().viewClassId(SequenceStructureView)) and \
129  self.tab().centerView().updateContent(True):
130  if not self.dataAccessor().isContainer(select) and self.currentCenterViewClassId() == self.plugin().viewClassId(ConnectionStructureView):
131  self.tab().centerView().select(select,500)
132  else:
133  self.tab().centerView().restoreSelection()
134  select = self.tab().centerView().selection()
135  if select != None:
136  if self.tab().propertyView().dataObject() != select and propertyView:
137  self.tab().propertyView().setDataObject(select)
138  self.tab().propertyView().updateContent()
139  if import_tools_error==None and self.tab().editorSplitter():
140  self.updateConfigHighlight()
141  self.plugin().application().stopWorking(statusMessage)
selection
main part
Definition: corrVsCorr.py:98
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateConfigHighlight (   self)

Definition at line 446 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.centerView(), relativeConstraints.keys, corrVsCorr.selection, Vispa.Main.TabController.TabController.tab(), RawParticle.tab, and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor().

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.codeSelected(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateCenterView().

447  def updateConfigHighlight(self):
448  if self.tab().editorTableView().selection() in self.toolDataAccessor().toolModules().keys():
449  self.tab().centerView().highlight(self.toolDataAccessor().toolModules()[self.tab().editorTableView().selection()])
450  else:
451  self.tab().centerView().highlight([])
selection
main part
Definition: corrVsCorr.py:98
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateContent (   self,
  filtered = False,
  propertyView = True 
)

Definition at line 494 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.setDataAccessor(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCode(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.codeSelected(), Vispa.Plugins.EdmBrowser.EventContentDialog.EventContentDialog.selectInputFile(), Vispa.Plugins.EdmBrowser.EventContentDialog.EventContentDialog.setConfigDataAccessor(), Vispa.Plugins.EdmBrowser.EventContentDialog.EventContentDialog.setEventContent(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateCenterView().

495  def updateContent(self, filtered=False, propertyView=True):
496  if import_tools_error==None and isinstance(object,ConfigToolBase):
497  propertyView=False
498  else:
499  self.tab().propertyView().setDataAccessor(self.dataAccessor())
500  BrowserTabController.updateContent(self, filtered, propertyView)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateViewMenu (   self)

Definition at line 80 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.centerView(), ConnectionManager.connect(), RPCDBCom.connect(), options.ConnectionL1TMenu.connect, TestBase.connect(), HCALConfigDB.connect(), ReadBase.connect(), l1t::DataManager.connect(), DTDQMHarvesting.DTDQMHarvesting.connect, cond::Logger.connect(), DTVDriftMeanTimerCalibration.DTVDriftMeanTimerCalibration.connect, DTVDriftSegmentCalibration.DTVDriftSegmentCalibration.connect, DTAnalysisResiduals.DTAnalysisResiduals.connect, DTTTrigProd.DTTTrigProd.connect, DTDQMValidation.DTDQMValidation.connect, DTNoiseCalibration.DTNoiseCalibration.connect, DTResidualCalibration.DTResidualCalibration.connect, DTTTrigValid.DTTTrigValid.connect, DTTTrigResidualCorr.DTTTrigResidualCorr.connect, ShallowTree::BranchConnector.connect(), ora::ConnectionPool.connect(), dqmservices::DQMMonitoringService.connect(), ShallowTree::TypedBranchConnector< T >.connect(), ora::DatabaseSession.connect(), SimActivityRegistry.connect(), sim_act::Signaler< BeginOfJob >.connect(), sim_act::Signaler< G4Step >.connect(), sim_act::Signaler< EndOfEvent >.connect(), sim_act::Signaler< BeginOfEvent >.connect(), sim_act::Signaler< BeginOfTrack >.connect(), sim_act::Signaler< DDDWorld >.connect(), sim_act::Signaler< BeginOfRun >.connect(), sim_act::Signaler< EndOfRun >.connect(), sim_act::Signaler< EndOfTrack >.connect(), sim_act::Signaler< T >.connect(), ora::Database.connect(), edm::ServiceToken.connect(), edm::signalslot::Signal< void(GlobalContext const &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &)>.connect(), edm::signalslot::Signal< void(edm::BranchDescription const &)>.connect(), edm::signalslot::Signal< void(const edmplugin::SharedLibrary &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void()>.connect(), edm::signalslot::Signal< void(edm::StreamContext const &, edm::ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &, HLTPathStatus const &)>.connect(), edm::signalslot::Signal< void(const std::string &, const std::string &)>.connect(), edm::signalslot::Signal< void(const std::string &, const edmplugin::PluginInfo &)>.connect(), edm::signalslot::Signal< void(service::SystemBounds const &)>.connect(), edm::signalslot::Signal< void(StreamID)>.connect(), edm::signalslot::Signal< void(const boost::filesystem::path &)>.connect(), edm::signalslot::Signal< void(PathsAndConsumesOfModulesBase const &, ProcessContext const &)>.connect(), edm::signalslot::Signal< T >.connect(), edm::signalslot::Signal< void(unsigned int, unsigned int)>.connect(), edm::signalslot::Signal< void(std::string const &, bool)>.connect(), edm::signalslot::Signal< void(ModuleDescription const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(TerminationOrigin)>.connect(), edm::signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(const edmplugin::PluginFactoryBase *)>.connect(), confdbOfflineConverter.OfflineConverter.connect, L1TOMDSHelper.connect(), PFCandConnector.connect(), DDTOBRodAlgo.connect, GlobalTag.GlobalTag.connect(), edm::signalslot::ObsoleteSignal< void(Run const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< void(std::string const &, HLTPathStatus const &)>.connect(), edm::signalslot::ObsoleteSignal< void(LuminosityBlock const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< void(Event const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< T >.connect(), edm::signalslot::ObsoleteSignal< void(RunID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(ModuleDescription const &)>.connect(), edm::signalslot::ObsoleteSignal< void(EventID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(LuminosityBlockID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(std::string const &)>.connect(), edm::serviceregistry::ServicesManager.connect(), cond::service::PoolDBOutputService.connect(), l1t::OMDSReader.connect(), edm::ActivityRegistry.connect(), lumi::service::DBService.disconnect(), ConnectionManager.disconnect(), HCALConfigDB.disconnect(), ora::DatabaseSession.disconnect(), ora::Database.disconnect(), cond::service::PoolDBOutputService.disconnect(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.onCenterViewDoubleClicked(), Vispa.Main.TabController.TabController.tab(), and RawParticle.tab.

80 
81  def updateViewMenu(self):
82  BrowserTabController.updateViewMenu(self)
83  self.disconnect(self.tab().centerView(), SIGNAL("doubleClicked"), self.onCenterViewDoubleClicked)
84  self.connect(self.tab().centerView(), SIGNAL("doubleClicked"), self.onCenterViewDoubleClicked)
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.valueChanged (   self,
  name 
)

Definition at line 520 of file ConfigEditorTabController.py.

References Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCode(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.codeSelected(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.importConfig(), corrVsCorr.selection, Vispa.Main.TabController.TabController.setModified(), Vispa.Main.TabController.TabController.tab(), RawParticle.tab, and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor().

Referenced by Vispa.Views.PropertyView.BooleanProperty.__init__(), Vispa.Views.PropertyView.StringProperty.buttonClicked(), Vispa.Views.PropertyView.TextEditWithButtonProperty.createLineEdit(), Vispa.Views.PropertyView.TextEditWithButtonProperty.createTextEdit(), Vispa.Views.PropertyView.BooleanProperty.setChecked(), Vispa.Views.PropertyView.BooleanProperty.setReadOnly(), Vispa.Views.PropertyView.DropDownProperty.setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty.setReadOnly(), and Vispa.Views.PropertyView.IntegerProperty.setValue().

521  def valueChanged(self,name):
522  if isinstance(self.tab().propertyView().dataObject(),ConfigToolBase):
523  if self._toolDataAccessor.label(self.tab().propertyView().dataObject())=="Import":
524  filename=self.toolDataAccessor().propertyValue(self.tab().propertyView().dataObject(),"filename")
525  return self.importConfig(filename)
526  else:
527  self.toolDataAccessor().updateProcess()
528  self.setModified(True)
529  self._updateCode(False)
530  self.codeSelected(self.tab().editorTableView().selection())
531  else:
532  self._updateCode()
selection
main part
Definition: corrVsCorr.py:98
def Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.writeFile (   self,
  filename 
)
Write replace config file.

Definition at line 325 of file ConfigEditorTabController.py.

References Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.dumpPython(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.open(), LaserDQM_cfg.process, and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor().

326  def writeFile(self, filename):
327  """ Write replace config file.
328  """
329  logging.debug(__name__ + ': writeFile')
330 
331  text_file = open(filename, "w")
332  text_file.write(self.toolDataAccessor().topLevelObjects()[0].dumpPython()[1])
333  if self.dataAccessor().process():
334  text_file.write(self.dataAccessor().process().dumpHistory(False))
335  text_file.close()
336  return True
tuple process
Definition: LaserDQM_cfg.py:3

Member Data Documentation

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._applyPatToolAction
private

Definition at line 366 of file ConfigEditorTabController.py.

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._configMenu
private

Definition at line 50 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.activated().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._configToolBar
private

Definition at line 51 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.activated().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._dotExportAction
private

Definition at line 59 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.dotExportAction().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._dumpAction
private

Definition at line 57 of file ConfigEditorTabController.py.

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._editorAction
private

Definition at line 66 of file ConfigEditorTabController.py.

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._editorName
private

Definition at line 43 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.chooseEditor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.loadIni(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.openEditor(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.saveIni().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._eventContentAction
private

Definition at line 63 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.EdmBrowser.EdmBrowserPlugin.EdmBrowserPlugin.eventContentAction().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._historyAction
private

Definition at line 61 of file ConfigEditorTabController.py.

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._importAction
private

Definition at line 363 of file ConfigEditorTabController.py.

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._originalSizes
private

Definition at line 45 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.maximizeEditor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.minimizeEditor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.originalEditor(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.startEditMode().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._thread
private

Definition at line 44 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController.isBusy(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController.readFile(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateCenterView().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._toolDataAccessor
private

Definition at line 371 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.applyButtonClicked(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.toolDataAccessor().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._toolDialog
private

Definition at line 46 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.applyButtonClicked().

Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController._updateCenterView
private

Definition at line 47 of file ConfigEditorTabController.py.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.readFile(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateCenterView().

tuple Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.staticSupportedFileTypes = staticmethod(staticSupportedFileTypes)
static

Definition at line 75 of file ConfigEditorTabController.py.