Exemple #1
0
 def __init__(self, histo2D, sym, viewport):
     DrawableManager.__init__(self, viewport)
     self.histo2D = histo2D
     self.sym = sym
     self.ID = None
     self._xproj = None
     self._yproj = None
     self._color = hdtv.color.default
Exemple #2
0
 def Hide(self):
     if self.viewport is None:
         return
     with LockViewport(self.viewport):
         DrawableManager.Hide(self)
         if self.hist:
             self.hist.Hide()
Exemple #3
0
 def Refresh(self):
     if self.viewport is None:
         return
     with LockViewport(self.viewport):
         DrawableManager.Refresh(self)
         if self.hist:
             self.hist.Refresh()
Exemple #4
0
 def Draw(self, viewport):
     self.viewport = viewport
     self.viewport.LockUpdate()
     DrawableManager.Draw(self, viewport)
     if self.hist:
         self.hist.Draw(viewport)
     self.viewport.UnlockUpdate()
Exemple #5
0
 def Show(self):
     if self.viewport is None:
         return
     with LockViewport(self.viewport):
         DrawableManager.Show(self)
         if self.hist:
             self.hist.Show()
Exemple #6
0
 def Refresh(self):
     if self.viewport is None:
         return
     self.viewport.LockUpdate()
     DrawableManager.Refresh(self)
     if self.hist:
         self.hist.Refresh()
     self.viewport.UnlockUpdate()
Exemple #7
0
 def Hide(self):
     if self.viewport is None:
         return
     self.viewport.LockUpdate()
     DrawableManager.Hide(self)
     if self.hist:
         self.hist.Hide()
     self.viewport.UnlockUpdate()
Exemple #8
0
 def Insert(self, obj, ID=None):
     """
     Insert cut to internal dict
     """
     obj.color = self.color
     obj.dashed = True
     if ID is None:
         ID = self.activeID
     ID = DrawableManager.Insert(self, obj, ID)
     self.ActivateObject(ID)
     return ID
Exemple #9
0
 def Draw(self, viewport):
     self.viewport = viewport
     with LockViewport(self.viewport):
         DrawableManager.Draw(self, viewport)
         if self.hist:
             self.hist.Draw(viewport)
Exemple #10
0
 def Pop(self, ID):
     fit = DrawableManager.Pop(self, ID)
     if fit is not None:
         fit.spec = None
     return fit
Exemple #11
0
 def Insert(self, fit, ID=None):
     fit.spec = self
     return DrawableManager.Insert(self, fit, ID)
Exemple #12
0
 def __setattr__(self, name, value):
     if self.hist is not None:
         self.hist.__setattr__(name, value)
     if hasattr(self, name):  # Update attribute of this class, if existent
         DrawableManager.__setattr__(self, name, value)
Exemple #13
0
 def __init__(self, histogram):
     # Create histogram attribute avoiding __setattr__ method
     self.__dict__["hist"] = histogram
     DrawableManager.__init__(self)