CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Vispa.Views.BoxDecayView.BoxDecayView Class Reference
Inheritance diagram for Vispa.Views.BoxDecayView.BoxDecayView:
Vispa.Views.WidgetView.WidgetView Vispa.Views.AbstractView.AbstractView Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner Vispa.Share.ObjectHolder.ObjectHolder Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner Vispa.Gui.Zoomable.Zoomable Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView Vispa.Plugins.EdmBrowser.EdmBrowserBoxView.EdmBrowserBoxView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConnectionStructureView Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.SequenceStructureView

Public Member Functions

def __init__ (self, parent=None)
 
def arrangeUsingRelations (self)
 
def boxContentScript (self)
 
def cancel (self)
 
def checkNumberOfObjects (self)
 
def closeEvent (self, event)
 
def collapseAll (self)
 
def collapseObject (self, object)
 
def contentStartX (self)
 
def contentStartY (self)
 
def createBox (self, widgetParent, container, title, text)
 
def createBoxesRecursive (self, operationId, objects, widgetParent, positionName="0")
 
def createConnection (self, w1, name1, w2, name2, color=None, portsVisible=True)
 
def createConnections (self, operationId, widgetParent)
 
def createSinkPort (self, w, name, visible=True)
 
def createSourcePort (self, w, name, visible=True)
 
def expandAll (self)
 
def expandObject (self, object)
 
def expandToDepth (self, depth)
 
def setArrangeUsingRelations (self, set)
 
def setBoxContentScript (self, script)
 
def setDataAccessor (self, accessor)
 
def setSortBeforeArranging (self, set)
 
def sortBeforeArranging (self)
 
def toggleCollapsed (self, object)
 
def updateContent (self, overrideCheck=False)
 
- Public Member Functions inherited from Vispa.Views.WidgetView.WidgetView
def __init__ (self, parent=None)
 
def addWidget (self, widget, object=None, positionName=0)
 
def clear (self)
 
def closeEvent (self, event)
 
def deselectAllWidgets (self, exception=None)
 
def isBusy (self)
 
def mousePressEvent (self, event)
 
def restoreSelection (self, offset=5)
 
def select (self, object, offset=5)
 
def selection (self)
 
def setDataObjects (self, objects)
 
def widgetByObject (self, object)
 
def widgetDoubleClicked (self, widget)
 
def widgets (self)
 
def widgetSelected (self, widget, multiSelect=False)
 
- Public Member Functions inherited from Vispa.Views.AbstractView.AbstractView
def __init__ (self)
 
def cancel (self)
 
def isBusy (self)
 
def restoreSelection (self)
 
def select (self, object)
 
def selection (self)
 
def updateContent (self)
 
- Public Member Functions inherited from Vispa.Share.ObjectHolder.ObjectHolder
def __init__ (self)
 
def allDataObjectChildren (self, objects=None)
 
def appendObject (self, object)
 
def applyFilter (self, objects)
 
def clearObjects (self)
 
def dataAccessor (self)
 
def dataObject (self)
 
def dataObjects (self)
 
def dataObjectsCount (self)
 
def numberDataObjectChildren (self, objects=None)
 
def removeObject (self, object)
 
def setDataAccessor (self, accessor)
 
def setDataObject (self, object)
 
def setDataObjects (self, objects)
 
def setExclusiveMode (self, exclusive=True)
 
def setFilter (self, filter)
 
- Public Member Functions inherited from Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner
def __init__ (self, parent=None)
 
def autosizeScrollArea (self)
 
def setZoom (self, zoom)
 
def widgetDragged (self, widget)
 
- Public Member Functions inherited from Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner
def deleteSelectedConnections (self)
 
def getWidgetByName (self, name)
 
def hideMenuWidgets (self)
 
def portConnection (self, port1, port2=None)
 
def propagateEventUnderConnectionWidget (self, connection, event)
 
def updateConnections (self)
 
- Public Member Functions inherited from Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner
def deselectAllWidgets (self, exception=None)
 
def enableMultiSelect (self, multiSelect=True)
 
def initWidgetMovement (self, widget)
 
def keyPressEvent (self, event)
 
def lastMovedWidgets (self)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def multiSelectEnabled (self)
 
def selectedWidgets (self)
 
def widgetAboutToDelete (self, widget)
 
def widgetDoubleClicked (self, widget)
 
def widgetDragged (self, widget)
 
def widgetSelected (self, widget, multiSelect=False)
 
- Public Member Functions inherited from Vispa.Gui.ZoomableWidget.ZoomableWidget
def __init__ (self, parent=None)
 
def exportImage (self, filename=None)
 
def setZoom (self, zoom)
 
- Public Member Functions inherited from Vispa.Gui.Zoomable.Zoomable
def __init__ (self)
 
def decrementZoom (self)
 
def incrementZoom (self)
 
def setZoom (self, zoom)
 
def zoom (self)
 
def zoomFactor (self)
 

Public Attributes

 WARNING_ABOVE
 

Private Member Functions

def _sortByRelations (self, objects)
 

Private Attributes

 _arrangeUsingRelationsFlag
 
 _boxContentScript
 
 _leftMargin
 
 _operationId
 
 _sortBeforeArranging
 
 _topMargin
 
 _updateCounter
 

Detailed Description

Visualizes a decay tree using boxes to represent containers as well as their contents.

Mother/daughter relations are represented by connection lines. The BoxDecayView is automatically filled using a DataAccessor.

Definition at line 19 of file BoxDecayView.py.

Constructor & Destructor Documentation

def Vispa.Views.BoxDecayView.BoxDecayView.__init__ (   self,
  parent = None 
)

Definition at line 30 of file BoxDecayView.py.

30  def __init__(self, parent=None):
31  logging.debug(__name__ + ": __init__")
32  WidgetView.__init__(self, parent)
33 
34  self._operationId = 0
38  self._leftMargin = ConnectableWidget.LEFT_MARGIN
39  self._topMargin = ConnectableWidget.TOP_MARGIN
41 
42  self.setPalette(QPalette(Qt.black, Qt.white))
43 
def __init__(self, parent=None)
Definition: BoxDecayView.py:30

Member Function Documentation

def Vispa.Views.BoxDecayView.BoxDecayView._sortByRelations (   self,
  objects 
)
private
Sort a list of objects by their mother/daughter relations.

All daughter objects are put directly behind the mother object in the list.
This sorting algorithm is run before the display of objects with relations.

Definition at line 276 of file BoxDecayView.py.

References Vispa.Share.ObjectHolder.ObjectHolder.dataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), and list().

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive(), and Vispa.Views.BoxDecayView.BoxDecayView.updateContent().

276  def _sortByRelations(self, objects):
277  """ Sort a list of objects by their mother/daughter relations.
278 
279  All daughter objects are put directly behind the mother object in the list.
280  This sorting algorithm is run before the display of objects with relations.
281  """
282  #logging.debug(__name__ + ": _sortByRelations")
283  if len(objects) == 0:
284  return ()
285  if len(objects) > self.NO_SORTING_ABOVE:
286  return objects
287  unsortedObjects = list(objects)
288  sortedObjects = []
289  for object in reversed(list(objects)):
290  globalMother=True
291  for mother in self.dataAccessor().allMotherRelations(object):
292  if mother in unsortedObjects:
293  globalMother=False
294  break
295  if object in unsortedObjects and globalMother:
296  unsortedObjects.remove(object)
297  sortedObjects.insert(0, object)
298  i = 0
299  for child in self.dataAccessor().allDaughterRelations(object):
300  if child in unsortedObjects:
301  i += 1
302  unsortedObjects.remove(child)
303  sortedObjects.insert(i, child)
304  sortedObjects += unsortedObjects
305  return tuple(sortedObjects)
306 
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def Vispa.Views.BoxDecayView.BoxDecayView.arrangeUsingRelations (   self)
def Vispa.Views.BoxDecayView.BoxDecayView.boxContentScript (   self)
def Vispa.Views.BoxDecayView.BoxDecayView.cancel (   self)
Stop all running operations.

Definition at line 78 of file BoxDecayView.py.

References Vispa.Views.BoxDecayView.BoxDecayView._operationId.

78  def cancel(self):
79  """ Stop all running operations.
80  """
81  self._operationId += 1
82 
def Vispa.Views.BoxDecayView.BoxDecayView.checkNumberOfObjects (   self)

Definition at line 83 of file BoxDecayView.py.

References Vispa.Share.ObjectHolder.ObjectHolder.numberDataObjectChildren(), str, and Vispa.Views.BoxDecayView.BoxDecayView.WARNING_ABOVE.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.updateContent().

84  numObjects=self.numberDataObjectChildren()
85  if self.WARNING_ABOVE>0 and numObjects>self.WARNING_ABOVE:
86  result=QCoreApplication.instance().showMessageBox("You are about to display more than "+str(numObjects)+" (>"+str(self.WARNING_ABOVE)+") objects. This may take some time. ",
87  "Would you like to continue?",
88  QMessageBox.Yes | QMessageBox.No,
89  QMessageBox.Yes, [("Yes (remember my decision)",QMessageBox.YesRole)])
90  if result == QMessageBox.No:
91  return False
92  if result == 0:
93  self.WARNING_ABOVE=0
94  return True
95 
def numberDataObjectChildren(self, objects=None)
#define str(s)
def Vispa.Views.BoxDecayView.BoxDecayView.closeEvent (   self,
  event 
)

Definition at line 307 of file BoxDecayView.py.

References ReducedTrackerTreeVariables.clear(), EopVariables.clear(), CastorCalibrationsSet.clear(), TkOffTreeVariables.clear(), StringMap.clear(), TrackerTreeVariables.clear(), AlignmentErrors.clear(), AlignmentErrorsExtended.clear(), Alignments.clear(), NumberOfDevices.clear(), CastorCalibrationWidthsSet.clear(), CTPPSTrkDetector.clear(), edm::reftobase::RefVectorHolderBase.clear(), OOTPileupCorrectionColl.clear(), HLTTauDQMOfflineObjects.clear(), HcalCalibrationsSet.clear(), HcalCalibrationWidthsSet.clear(), Overlayer.clear(), StorableDoubleMap< T >.clear(), Vispa.Plugins.EdmBrowser.EventContentView.EventContentView.clear(), EcalCondObjectContainer< T >.clear(), Vispa.Share.FindAlgorithm.FindAlgorithm.clear(), edm::BranchChildren.clear(), EcalContainer< DetId, T >.clear(), ecaldqm::MESetMulti.clear(), edm::reftobase::RefVectorHolder< REFV >.clear(), edm::reftobase::BaseVectorHolder< T >.clear(), CSCALCTDigi.clear(), HcalIndexLookup.clear(), HcalItemColl< Item >.clear(), CSCCLCTPreTriggerDigi.clear(), CSCCLCTDigi.clear(), helper::ClusterStorer.clear(), edm::reftobase::IndirectVectorHolder< T >.clear(), ClusterCollectionFP420.clear(), RecoCollectionFP420.clear(), TrackCollectionFP420.clear(), DigiCollectionFP420.clear(), KDTreeLinkerAlgo< DATA >.clear(), CSCCorrelatedLCTDigi.clear(), reco::PattRecoTree< ScaleType, Cluster >.clear(), ClhepEvaluator.clear(), OpticalAlignMeasurementInfo.clear(), SiPixelPerformanceSummary.clear(), FWFromSliceSelector.clear(), SegmentToTrackAssociator.clear(), pos::PixelROCStatus.clear(), edm::reftobase::VectorHolder< T, REFV >.clear(), HBHEChannelInfo.clear(), CTPPSToFDetector.clear(), AlignmentParameterSelector.clear(), edm::OrphanHandleBase.clear(), ME0TriggerDigi.clear(), ecaldqm::MESet.clear(), HcalItemArrayColl< Item, N >.clear(), edm::ParentageRegistry.clear(), HLTPerformanceInfo::Module.clear(), CSCTriggerContainer< T >.clear(), edm::RefToBaseVector< T >.clear(), edm::StreamedProduct.clear(), edm::ScheduleItems.clear(), DTBufferTree< Key, Content >.clear(), DrawIteration.clear(), edm::ThinnedAssociationsHelper.clear(), KDTreeNodes< DATA >.clear(), cond::Iov_t.clear(), edm::WorkerRegistry.clear(), OpticalAlignParam.clear(), Vispa.Views.TreeView.TreeView.clear(), edm::HandleBase.clear(), SiStripQuality.clear(), egHLT::OffEvt.clear(), edm::TrieFactory< T >.clear(), SiStripDelay.clear(), DDI::Store< N, I, K >.clear(), cond::Tag_t.clear(), TrackerDetToDTCELinkCablingMap.clear(), edm::Association< C >.clear(), DTTFFEDReader.clear(), Vispa.Views.TableView.TableView.clear(), SiPixelCalibDigiProducer.clear(), edm::DetSet< T >.clear(), edm::EventSetupImpl.clear(), edm::ProcessHistory.clear(), MuonResidualsFromTrack.clear(), FBaseSimEvent.clear(), DTuROSDigiToRaw.clear(), CTPPSRPAlignmentCorrectionsData.clear(), edm::PtrVectorBase.clear(), Vispa.Views.PropertyView.PropertyView.clear(), HLTPerformanceInfo::Path.clear(), l1t::IntervalManager< TimeType, PayloadType >.clear(), BXVector< T >.clear(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >.clear(), HcalDTCHeader.clear(), DTCCBConfig.clear(), OpticalAlignInfo.clear(), Vispa.Views.WidgetView.WidgetView.clear(), StudyHLT.clear(), DDXMLElement.clear(), CSCDCCExaminer.clear(), FQueue< T >.clear(), edm::Handle< GenericObject >.clear(), DTLVStatus.clear(), edm::BasicHandle.clear(), DTT0.clear(), edm::RefVectorBase< KEY >.clear(), DTTPGParameters.clear(), DTRangeT0.clear(), CastorCTDCHeader.clear(), FWGeometry.clear(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.clear(), HcalDCCHeader.clear(), AlignmentParameterSelector::PXBDetIdRanges.clear(), DTHVStatus.clear(), edm::Handle< FWGenericObject >.clear(), edm::TrieNode< T >.clear(), DTReadOutMapping.clear(), edm::OwnArray< T, MAX_SIZE, P >.clear(), reco::FlavorHistoryEvent.clear(), AlignmentParameterSelector::PXFDetIdRanges.clear(), edm::AssociationMap< Tag >.clear(), edm::RefVector< C, T, F >.clear(), DTPerformance.clear(), DTTtrig.clear(), AlignmentParameterSelector::TIBDetIdRanges.clear(), DTStatusFlag.clear(), HLTPerformanceInfo.clear(), edm::OwnVector< T, P >.clear(), edm::ValueMap< T >.clear(), DTDeadFlag.clear(), AlignmentParameterSelector::TIDDetIdRanges.clear(), rpcamc13::AMCPayload.clear(), AlignmentParameterSelector::TOBDetIdRanges.clear(), DTMtime.clear(), pos::PixelFEDCard.clear(), math::Graph< N, E >.clear(), AlignmentParameterSelector::TECDetIdRanges.clear(), edm::Trie< T >.clear(), Json::Value.clear(), reco::HitPattern.clear(), and BeautifulSoup.Tag.clear().

307  def closeEvent(self, event):
308  self.clear()
309  WidgetView.closeEvent(self, event)
310 
def Vispa.Views.BoxDecayView.BoxDecayView.collapseAll (   self)

Definition at line 322 of file BoxDecayView.py.

References Vispa.Views.WidgetView.WidgetView.widgets(), and progressbar.ProgressBar.widgets.

Referenced by Vispa.Views.TreeView.TreeView.expandToDepthDialog().

322  def collapseAll(self):
323  for widget in self.widgets():
324  if isinstance(widget,WidgetContainer) and not widget.collapsed():
325  widget.toggleCollapse()
326 
def Vispa.Views.BoxDecayView.BoxDecayView.collapseObject (   self,
  object 
)

Definition at line 344 of file BoxDecayView.py.

References Vispa.Views.WidgetView.WidgetView.widgetByObject(), and Vispa.Views.BoxDecayView.BoxDecayContainer.widgetByObject().

344  def collapseObject(self,object):
345  widget=self.widgetByObject(object)
346  if isinstance(widget,WidgetContainer) and not widget.collapsed():
347  widget.toggleCollapse()
348 
def widgetByObject(self, object)
Definition: WidgetView.py:52
def Vispa.Views.BoxDecayView.BoxDecayView.contentStartX (   self)

Definition at line 311 of file BoxDecayView.py.

References Vispa.Gui.Zoomable.Zoomable.zoomFactor().

311  def contentStartX(self):
312  return 10 * self.zoomFactor()
313 
def Vispa.Views.BoxDecayView.BoxDecayView.contentStartY (   self)

Definition at line 314 of file BoxDecayView.py.

References Vispa.Gui.Zoomable.Zoomable.zoomFactor().

314  def contentStartY(self):
315  return 10 * self.zoomFactor()
316 
def Vispa.Views.BoxDecayView.BoxDecayView.createBox (   self,
  widgetParent,
  container,
  title,
  text 
)
Create a WidgetContainer or ConnectableWidget and set its properties.

Definition at line 129 of file BoxDecayView.py.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive().

129  def createBox(self, widgetParent, container, title, text):
130  """ Create a WidgetContainer or ConnectableWidget and set its properties.
131  """
132  if container:
133  widget = BoxDecayContainer(widgetParent)
134  else:
135  widget = ConnectableWidget(widgetParent)
136  widget.noRearangeContent()
137  widget.setText(text)
138  widget.textField().setOutputFlags(Qt.AlignLeft)
139  widget.setShowPortNames(True)
140  widget.setDragable(False)
141  widget.setDeletable(False)
142  widget.enableAutosizing(True, False)
143 # widget.ROUNDRECT_RADIUS=0
144 # widget.setColors(Qt.black,Qt.white,Qt.white)
145  widget.setTitle(title)
146  return widget
147 
def createBox(self, widgetParent, container, title, text)
def Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive (   self,
  operationId,
  objects,
  widgetParent,
  positionName = "0" 
)
Creates a box from an object.

All children of this object are created recursively.

Definition at line 213 of file BoxDecayView.py.

References Vispa.Views.BoxDecayView.BoxDecayView._boxContentScript, Vispa.Views.BoxDecayView.BoxDecayView._operationId, Vispa.Views.BoxDecayView.BoxDecayView._sortBeforeArranging, Vispa.Views.BoxDecayView.BoxDecayView._sortByRelations(), Vispa.Views.BoxDecayView.BoxDecayView._updateCounter, Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._updateCounter, Vispa.Gui.Header.FrameWithHeader.addWidget(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer.addWidget(), Vispa.Views.WidgetView.WidgetView.addWidget(), Vispa.Share.ObjectHolder.ObjectHolder.applyFilter(), Vispa.Views.BoxDecayView.BoxDecayView.arrangeUsingRelations(), Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.autosizeScrollArea(), class-composition.children, Vispa.Plugins.EdmBrowser.EdmBrowserBoxView.EdmBrowserBoxView.createBox(), Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.createBox(), Vispa.Views.BoxDecayView.BoxDecayView.createBox(), Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive(), Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView.createConnections(), Vispa.Views.BoxDecayView.BoxDecayView.createConnections(), Vispa.Share.ObjectHolder.ObjectHolder.dataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Main.Exceptions.exception_traceback(), label, python.rootplot.root2matplotlib.replace(), and str.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive(), and Vispa.Views.BoxDecayView.BoxDecayView.updateContent().

213  def createBoxesRecursive(self, operationId, objects, widgetParent, positionName="0"):
214  """ Creates a box from an object.
215 
216  All children of this object are created recursively.
217  """
218  #logging.debug(__name__ + ": createBoxesRecursive")
219  if self._sortBeforeArranging and self.arrangeUsingRelations():
220  thread = ThreadChain(self._sortByRelations, objects)
221  while thread.isRunning():
222  if not Application.NO_PROCESS_EVENTS:
223  QCoreApplication.instance().processEvents()
224  objects=thread.returnValue()
225 
226  i = 1
227  for object in objects:
228  if operationId != self._operationId:
229  return None
230  # Process application event loop in order to accept user input during time consuming drawing operation
231  self._updateCounter+=1
232  if self._updateCounter>=self.UPDATE_EVERY:
233  self._updateCounter=0
234  if not Application.NO_PROCESS_EVENTS:
235  QCoreApplication.instance().processEvents()
236  # create box
237  text = ""
238  if self._boxContentScript != "":
239  dataAccessorObject = BasicDataAccessorInterface(object, self.dataAccessor(), False)
240  try:
241  text = dataAccessorObject.runScript(self._boxContentScript).replace("None", "")
242  except Exception as e:
243  logging.info("Error in script: " + exception_traceback())
244  text = ""
245  widget = self.createBox(widgetParent, self.dataAccessor().isContainer(object), self.dataAccessor().label(object), text)
246  child_positionName = positionName + "-" + str(i)
247  self.addWidget(widget, object, child_positionName)
248  i += 1
249 
250  # create Connections
251  if not self.createConnections(operationId, widgetParent):
252  return None
253 
254  for widget in widgetParent.children():
255  # Abort drawing if operationId out of date
256  if operationId != self._operationId:
257  return None
258  # create children objects
259  if isinstance(widget, WidgetContainer):
260  if not self.createBoxesRecursive(operationId, self.applyFilter(self.dataAccessor().children(widget.object)), widget, positionName):
261  return None
262  if isinstance(widget, (WidgetContainer,ConnectableWidget)):
263  widget.noRearangeContent(False)
264 
265  for widget in widgetParent.children():
266  # Abort drawing if operationId out of date
267  if operationId != self._operationId:
268  return None
269  # draw box
270  if isinstance(widget, (WidgetContainer,ConnectableWidget)):
271  widget.show()
272  self.autosizeScrollArea()
273 
274  return True
275 
def createConnections(self, operationId, widgetParent)
def replace(string, replacements)
def createBoxesRecursive(self, operationId, objects, widgetParent, positionName="0")
char const * label
def createBox(self, widgetParent, container, title, text)
def addWidget(self, widget, object=None, positionName=0)
Definition: WidgetView.py:109
#define str(s)
def Vispa.Views.BoxDecayView.BoxDecayView.createConnection (   self,
  w1,
  name1,
  w2,
  name2,
  color = None,
  portsVisible = True 
)
Create a connection widget between w1 and w2.

Definition at line 174 of file BoxDecayView.py.

References Vispa.Views.BoxDecayView.BoxDecayView.createSinkPort(), and Vispa.Views.BoxDecayView.BoxDecayView.createSourcePort().

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createConnections().

174  def createConnection(self, w1, name1, w2, name2, color=None, portsVisible=True):
175  """ Create a connection widget between w1 and w2.
176  """
177  port1 = self.createSourcePort(w1, name1, portsVisible)
178  port2 = self.createSinkPort(w2, name2, portsVisible)
179  connection = LinearPortConnection(w1.parent(), port1, port2)
180  connection.setSelectable(False)
181  connection.setDeletable(False)
182 
183  if color:
184  connection.FILL_COLOR2 = color
185  return connection
186 
def createSinkPort(self, w, name, visible=True)
def createConnection(self, w1, name1, w2, name2, color=None, portsVisible=True)
def createSourcePort(self, w, name, visible=True)
def Vispa.Views.BoxDecayView.BoxDecayView.createConnections (   self,
  operationId,
  widgetParent 
)
Create connection lines between objects.

In BoxDecayView default mother-daughter relations are vizualized by the connections.

Definition at line 187 of file BoxDecayView.py.

References Vispa.Views.BoxDecayView.BoxDecayView._operationId, Vispa.Views.BoxDecayView.BoxDecayView._updateCounter, Vispa.Plugins.ConfigEditor.ConfigEditorBoxView.ConfigEditorBoxView._updateCounter, Vispa.Views.BoxDecayView.BoxDecayView.createConnection(), Vispa.Share.ObjectHolder.ObjectHolder.dataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Views.WidgetView.WidgetView.widgetByObject(), and Vispa.Views.BoxDecayView.BoxDecayContainer.widgetByObject().

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive().

187  def createConnections(self, operationId, widgetParent):
188  """ Create connection lines between objects.
189 
190  In BoxDecayView default mother-daughter relations are vizualized by the connections.
191  """
192  for w1 in widgetParent.children():
193  # Process application event loop in order to accept user input during time consuming drawing operation
194  self._updateCounter+=1
195  if self._updateCounter>=self.UPDATE_EVERY:
196  self._updateCounter=0
197  if not Application.NO_PROCESS_EVENTS:
198  QCoreApplication.instance().processEvents()
199  # Abort drawing if operationId out of date
200  if operationId != self._operationId:
201  return None
202  if isinstance(w1, ConnectableWidget):
203  w1.setShowPortNames(False)
204  for daughter in self.dataAccessor().daughterRelations(w1.object):
205  if self.dataAccessor().isContainer(w1.object) or self.dataAccessor().isContainer(daughter):
206  continue
207  w2 = self.widgetByObject(daughter)
208  if w2:
209  connectionWidget = self.createConnection(w1, 'daughterRelations', w2, 'motherRelations', None, False)
210  connectionWidget.stackUnder(w2)
211  return True
212 
def createConnections(self, operationId, widgetParent)
def widgetByObject(self, object)
Definition: WidgetView.py:52
def createConnection(self, w1, name1, w2, name2, color=None, portsVisible=True)
def Vispa.Views.BoxDecayView.BoxDecayView.createSinkPort (   self,
  w,
  name,
  visible = True 
)
Create a sink port and set its properties.

Definition at line 161 of file BoxDecayView.py.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createConnection().

161  def createSinkPort(self, w, name, visible=True):
162  """ Create a sink port and set its properties.
163  """
164  port = w.sinkPort(name)
165  if not port:
166  port = w.addSinkPort(name)
167  port.setDragable(False)
168  port.setSelectable(False)
169  if not visible:
170  port.HEIGHT = 0
171  port.show()
172  return port
173 
def createSinkPort(self, w, name, visible=True)
def Vispa.Views.BoxDecayView.BoxDecayView.createSourcePort (   self,
  w,
  name,
  visible = True 
)
Create a source port and set its properties.

Definition at line 148 of file BoxDecayView.py.

Referenced by Vispa.Views.BoxDecayView.BoxDecayView.createConnection().

148  def createSourcePort(self, w, name, visible=True):
149  """ Create a source port and set its properties.
150  """
151  port = w.sourcePort(name)
152  if not port:
153  port = w.addSourcePort(name)
154  port.setDragable(False)
155  port.setSelectable(False)
156  if not visible:
157  port.HEIGHT = 0
158  port.show()
159  return port
160 
def createSourcePort(self, w, name, visible=True)
def Vispa.Views.BoxDecayView.BoxDecayView.expandAll (   self)

Definition at line 317 of file BoxDecayView.py.

References Vispa.Views.WidgetView.WidgetView.widgets(), and progressbar.ProgressBar.widgets.

317  def expandAll(self):
318  for widget in self.widgets():
319  if isinstance(widget,WidgetContainer) and widget.collapsed():
320  widget.toggleCollapse()
321 
def Vispa.Views.BoxDecayView.BoxDecayView.expandObject (   self,
  object 
)

Definition at line 339 of file BoxDecayView.py.

References Vispa.Views.WidgetView.WidgetView.widgetByObject(), and Vispa.Views.BoxDecayView.BoxDecayContainer.widgetByObject().

339  def expandObject(self,object):
340  widget=self.widgetByObject(object)
341  if isinstance(widget,WidgetContainer) and widget.collapsed():
342  widget.toggleCollapse()
343 
def widgetByObject(self, object)
Definition: WidgetView.py:52
def Vispa.Views.BoxDecayView.BoxDecayView.expandToDepth (   self,
  depth 
)

Definition at line 327 of file BoxDecayView.py.

References Vispa.Views.WidgetView.WidgetView.widgets(), and progressbar.ProgressBar.widgets.

Referenced by Vispa.Views.TreeView.TreeView.expandToDepthDialog(), and Vispa.Views.TreeView.TreeView.updateContent().

327  def expandToDepth(self,depth):
328  for widget in self.widgets():
329  if isinstance(widget,WidgetContainer):
330  mother=widget
331  d=0
332  while isinstance(mother.parent(),WidgetContainer):
333  mother=mother.parent()
334  d+=1
335  if not widget.collapsed() and d>=depth or\
336  widget.collapsed() and d<depth:
337  widget.toggleCollapse()
338 
def Vispa.Views.BoxDecayView.BoxDecayView.setArrangeUsingRelations (   self,
  set 
)

Definition at line 44 of file BoxDecayView.py.

References Vispa.Views.BoxDecayView.BoxDecayView.WARNING_ABOVE.

44  def setArrangeUsingRelations(self, set):
45  if self.WARNING_ABOVE>0:
46  if set:
47  self.WARNING_ABOVE=300
48  else:
49  self.WARNING_ABOVE=1000
51 
def Vispa.Views.BoxDecayView.BoxDecayView.setBoxContentScript (   self,
  script 
)

Definition at line 61 of file BoxDecayView.py.

61  def setBoxContentScript(self, script):
62  self._boxContentScript = script
63 
def Vispa.Views.BoxDecayView.BoxDecayView.setDataAccessor (   self,
  accessor 
)
Sets the DataAccessor from which the boxes are created.

You need to call updateContent() in order to make the changes visible.   

Definition at line 67 of file BoxDecayView.py.

67  def setDataAccessor(self, accessor):
68  """ Sets the DataAccessor from which the boxes are created.
69 
70  You need to call updateContent() in order to make the changes visible.
71  """
72  if not isinstance(accessor, BasicDataAccessor):
73  raise TypeError(__name__ + " requires data accessor of type BasicDataAccessor.")
74  if not isinstance(accessor, RelativeDataAccessor):
75  raise TypeError(__name__ + " requires data accessor of type RelativeDataAccessor.")
76  WidgetView.setDataAccessor(self, accessor)
77 
def Vispa.Views.BoxDecayView.BoxDecayView.setSortBeforeArranging (   self,
  set 
)
def Vispa.Views.BoxDecayView.BoxDecayView.sortBeforeArranging (   self)
def Vispa.Views.BoxDecayView.BoxDecayView.toggleCollapsed (   self,
  object 
)

Definition at line 349 of file BoxDecayView.py.

References edm::signalslot::Signal< T >.emit(), Signal< void(BranchDescription const &)>.emit(), edm::signalslot::Signal< void(StreamID)>.emit(), edm::signalslot::Signal< void(const std::string &, const std::string &)>.emit(), edm::signalslot::Signal< void(service::SystemBounds const &)>.emit(), edm::signalslot::Signal< void(StreamContext const &)>.emit(), edm::signalslot::Signal< void(const std::string &, const edmplugin::PluginInfo &)>.emit(), edm::signalslot::Signal< void(TerminationOrigin)>.emit(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &, HLTPathStatus const &)>.emit(), edm::signalslot::Signal< void(edm::StreamContext const &, edm::ModuleCallingContext const &)>.emit(), edm::signalslot::Signal< void()>.emit(), edm::signalslot::Signal< void(std::string const &, bool)>.emit(), edm::signalslot::Signal< void(RunIndex)>.emit(), edm::signalslot::Signal< void(GlobalContext const &, ModuleCallingContext const &)>.emit(), edm::signalslot::Signal< void(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)>.emit(), edm::signalslot::Signal< void(LuminosityBlockIndex)>.emit(), edm::signalslot::Signal< void(const edmplugin::SharedLibrary &)>.emit(), edm::signalslot::Signal< void(edm::BranchDescription const &)>.emit(), edm::signalslot::Signal< void(GlobalContext const &)>.emit(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &)>.emit(), edm::signalslot::Signal< void(GlobalContext const &, TerminationOrigin)>.emit(), edm::signalslot::Signal< void(const boost::filesystem::path &)>.emit(), edm::signalslot::Signal< void(const edmplugin::PluginFactoryBase *)>.emit(), edm::signalslot::Signal< void(PathsAndConsumesOfModulesBase const &, ProcessContext const &)>.emit(), edm::signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)>.emit(), edm::signalslot::Signal< void(StreamContext const &, TerminationOrigin)>.emit(), and edm::signalslot::Signal< void(ModuleDescription const &)>.emit().

Referenced by Vispa.Views.BoxDecayView.BoxDecayContainer.toggleCollapse().

349  def toggleCollapsed(self,object):
350  self.emit(SIGNAL("toggleCollapsed"), object)
351 
def Vispa.Views.BoxDecayView.BoxDecayView.updateContent (   self,
  overrideCheck = False 
)
Clear the BoxDecayView and refill it.

Definition at line 96 of file BoxDecayView.py.

References Vispa.Views.BoxDecayView.BoxDecayView._operationId, Vispa.Views.BoxDecayView.BoxDecayView._sortBeforeArranging, Vispa.Views.BoxDecayView.BoxDecayView._sortByRelations(), Vispa.Views.WidgetView.WidgetView._updatingFlag, Vispa.Views.TreeView.TreeView._updatingFlag, Vispa.Views.TableView.TableView._updatingFlag, Vispa.Views.RootCanvasView.RootCanvasView._updatingFlag, Vispa.Views.PropertyView.PropertyView._updatingFlag, Vispa.Share.ObjectHolder.ObjectHolder.applyFilter(), Vispa.Views.BoxDecayView.BoxDecayView.arrangeUsingRelations(), Vispa.Gui.TextDialog.TextDialog.cancel, Vispa.Views.AbstractView.AbstractView.cancel(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.cancel(), Vispa.Main.TabController.TabController.cancel(), Vispa.Main.Application.Application.cancel(), Vispa.Views.BoxDecayView.BoxDecayView.checkNumberOfObjects(), ReducedTrackerTreeVariables.clear(), EopVariables.clear(), CastorCalibrationsSet.clear(), TkOffTreeVariables.clear(), TrackerTreeVariables.clear(), StringMap.clear(), AlignmentErrors.clear(), AlignmentErrorsExtended.clear(), Alignments.clear(), NumberOfDevices.clear(), CTPPSTrkDetector.clear(), CastorCalibrationWidthsSet.clear(), OOTPileupCorrectionColl.clear(), HLTTauDQMOfflineObjects.clear(), edm::reftobase::RefVectorHolderBase.clear(), HcalCalibrationsSet.clear(), HcalCalibrationWidthsSet.clear(), Overlayer.clear(), StorableDoubleMap< T >.clear(), Vispa.Plugins.EdmBrowser.EventContentView.EventContentView.clear(), EcalCondObjectContainer< T >.clear(), Vispa.Share.FindAlgorithm.FindAlgorithm.clear(), edm::BranchChildren.clear(), EcalContainer< DetId, T >.clear(), ecaldqm::MESetMulti.clear(), edm::reftobase::RefVectorHolder< REFV >.clear(), edm::reftobase::BaseVectorHolder< T >.clear(), CSCALCTDigi.clear(), HcalItemColl< Item >.clear(), HcalIndexLookup.clear(), CSCCLCTPreTriggerDigi.clear(), CSCCLCTDigi.clear(), helper::ClusterStorer.clear(), edm::reftobase::IndirectVectorHolder< T >.clear(), KDTreeLinkerAlgo< DATA >.clear(), ClusterCollectionFP420.clear(), RecoCollectionFP420.clear(), TrackCollectionFP420.clear(), DigiCollectionFP420.clear(), CSCCorrelatedLCTDigi.clear(), reco::PattRecoTree< ScaleType, Cluster >.clear(), ClhepEvaluator.clear(), OpticalAlignMeasurementInfo.clear(), SiPixelPerformanceSummary.clear(), pos::PixelROCStatus.clear(), CTPPSToFDetector.clear(), FWFromSliceSelector.clear(), SegmentToTrackAssociator.clear(), edm::reftobase::VectorHolder< T, REFV >.clear(), HBHEChannelInfo.clear(), edm::OrphanHandleBase.clear(), AlignmentParameterSelector.clear(), ME0TriggerDigi.clear(), ecaldqm::MESet.clear(), edm::ParentageRegistry.clear(), HcalItemArrayColl< Item, N >.clear(), HLTPerformanceInfo::Module.clear(), CSCTriggerContainer< T >.clear(), edm::RefToBaseVector< T >.clear(), edm::StreamedProduct.clear(), edm::ScheduleItems.clear(), DTBufferTree< Key, Content >.clear(), DrawIteration.clear(), KDTreeNodes< DATA >.clear(), cond::Iov_t.clear(), edm::ThinnedAssociationsHelper.clear(), OpticalAlignParam.clear(), edm::WorkerRegistry.clear(), SiStripQuality.clear(), Vispa.Views.TreeView.TreeView.clear(), edm::HandleBase.clear(), egHLT::OffEvt.clear(), edm::TrieFactory< T >.clear(), SiStripDelay.clear(), DDI::Store< N, I, K >.clear(), cond::Tag_t.clear(), TrackerDetToDTCELinkCablingMap.clear(), edm::Association< C >.clear(), DTTFFEDReader.clear(), Vispa.Views.TableView.TableView.clear(), SiPixelCalibDigiProducer.clear(), edm::DetSet< T >.clear(), edm::EventSetupImpl.clear(), edm::ProcessHistory.clear(), MuonResidualsFromTrack.clear(), FBaseSimEvent.clear(), DTuROSDigiToRaw.clear(), CTPPSRPAlignmentCorrectionsData.clear(), edm::PtrVectorBase.clear(), Vispa.Views.PropertyView.PropertyView.clear(), HLTPerformanceInfo::Path.clear(), l1t::IntervalManager< TimeType, PayloadType >.clear(), BXVector< T >.clear(), edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >.clear(), OpticalAlignInfo.clear(), HcalDTCHeader.clear(), DTCCBConfig.clear(), Vispa.Views.WidgetView.WidgetView.clear(), StudyHLT.clear(), DDXMLElement.clear(), CSCDCCExaminer.clear(), FQueue< T >.clear(), DTLVStatus.clear(), edm::Handle< GenericObject >.clear(), DTT0.clear(), edm::BasicHandle.clear(), edm::RefVectorBase< KEY >.clear(), DTTPGParameters.clear(), DTRangeT0.clear(), CastorCTDCHeader.clear(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.clear(), FWGeometry.clear(), HcalDCCHeader.clear(), AlignmentParameterSelector::PXBDetIdRanges.clear(), DTHVStatus.clear(), edm::Handle< FWGenericObject >.clear(), edm::TrieNode< T >.clear(), DTReadOutMapping.clear(), edm::OwnArray< T, MAX_SIZE, P >.clear(), reco::FlavorHistoryEvent.clear(), AlignmentParameterSelector::PXFDetIdRanges.clear(), edm::AssociationMap< Tag >.clear(), edm::RefVector< C, T, F >.clear(), DTTtrig.clear(), DTPerformance.clear(), AlignmentParameterSelector::TIBDetIdRanges.clear(), DTStatusFlag.clear(), HLTPerformanceInfo.clear(), edm::OwnVector< T, P >.clear(), edm::ValueMap< T >.clear(), DTDeadFlag.clear(), AlignmentParameterSelector::TIDDetIdRanges.clear(), rpcamc13::AMCPayload.clear(), AlignmentParameterSelector::TOBDetIdRanges.clear(), DTMtime.clear(), pos::PixelFEDCard.clear(), math::Graph< N, E >.clear(), AlignmentParameterSelector::TECDetIdRanges.clear(), edm::Trie< T >.clear(), Json::Value.clear(), reco::HitPattern.clear(), BeautifulSoup.Tag.clear(), Vispa.Views.BoxDecayView.BoxDecayView.createBoxesRecursive(), Vispa.Share.ObjectHolder.ObjectHolder.dataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.dataAccessor(), Vispa.Share.ObjectHolder.ObjectHolder.dataObject(), and Vispa.Share.ObjectHolder.ObjectHolder.dataObjects().

96  def updateContent(self, overrideCheck=False):
97  """ Clear the BoxDecayView and refill it.
98  """
99  logging.debug(__name__ + ": updateContent")
100  self.cancel()
101  if self.dataAccessor() == None:
102  return False
103  self._updatingFlag+=1
104  self.clear()
105  if self.dataObject()==None:
106  self._updatingFlag-=1
107  return True
108  operationId = self._operationId
109  if not overrideCheck:
110  if not self.checkNumberOfObjects():
111  self._updatingFlag-=1
112  return False
113  objects = self.applyFilter(self.dataObjects())
114  if self._sortBeforeArranging and self.arrangeUsingRelations():
115  thread = ThreadChain(self._sortByRelations, objects)
116  while thread.isRunning():
117  if not Application.NO_PROCESS_EVENTS:
118  QCoreApplication.instance().processEvents()
119  objects=thread.returnValue()
120  if operationId != self._operationId:
121  self._updatingFlag -=1
122  return False
123  self.createBoxesRecursive(operationId, objects, self)
124  # arrange objects which are not within a container
125  BoxDecayContainer.autolayoutAlgorithm(self)
126  self._updatingFlag -=1
127  return operationId == self._operationId
128 
def createBoxesRecursive(self, operationId, objects, widgetParent, positionName="0")
def updateContent(self, overrideCheck=False)
Definition: BoxDecayView.py:96

Member Data Documentation

Vispa.Views.BoxDecayView.BoxDecayView._arrangeUsingRelationsFlag
private
Vispa.Views.BoxDecayView.BoxDecayView._boxContentScript
private
Vispa.Views.BoxDecayView.BoxDecayView._leftMargin
private

Definition at line 38 of file BoxDecayView.py.

Vispa.Views.BoxDecayView.BoxDecayView._operationId
private
Vispa.Views.BoxDecayView.BoxDecayView._sortBeforeArranging
private
Vispa.Views.BoxDecayView.BoxDecayView._topMargin
private

Definition at line 39 of file BoxDecayView.py.

Vispa.Views.BoxDecayView.BoxDecayView._updateCounter
private
Vispa.Views.BoxDecayView.BoxDecayView.WARNING_ABOVE