CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
plotting.Plotter Class Reference

Public Member Functions

def __init__
 
def append
 
def appendTable
 
def clear
 
def getPlotFolder
 
def getPlotFolderNames
 
def getPlotFolders
 
def readDirs
 

Private Attributes

 _plots
 

Detailed Description

Contains PlotFolders, i.e. the information what plots to do, and creates a helper object to actually produce the plots.

Definition at line 2970 of file plotting.py.

Constructor & Destructor Documentation

def plotting.Plotter.__init__ (   self)

Definition at line 2972 of file plotting.py.

2973  def __init__(self):
2974  self._plots = []
2975  _setStyle()
2976  ROOT.TH1.AddDirectory(False)
def _setStyle
Definition: plotting.py:21

Member Function Documentation

def plotting.Plotter.append (   self,
  args,
  kwargs 
)
Append a plot folder to the plotter.

All arguments are forwarded to the constructor of PlotterItem.

Definition at line 2977 of file plotting.py.

Referenced by diclist.diclist.add(), and BeautifulSoup.Tag.setString().

2978  def append(self, *args, **kwargs):
2979  """Append a plot folder to the plotter.
2980 
2981  All arguments are forwarded to the constructor of PlotterItem.
2982  """
2983  self._plots.append(PlotterItem(*args, **kwargs))
def plotting.Plotter.appendTable (   self,
  attachToFolder,
  args,
  kwargs 
)

Definition at line 2984 of file plotting.py.

References plotting.PlotGroup._plots, plotting.PlotOnSideGroup._plots, and plotting.Plotter._plots.

2985  def appendTable(self, attachToFolder, *args, **kwargs):
2986  for plotterItem in self._plots:
2987  if plotterItem.getName() == attachToFolder:
2988  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2989  return
2990  raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder)
def plotting.Plotter.clear (   self)
Remove all plot folders and tables

Definition at line 2991 of file plotting.py.

References plotting.PlotGroup._plots, plotting.PlotOnSideGroup._plots, and plotting.Plotter._plots.

2992  def clear(self):
2993  """Remove all plot folders and tables"""
2994  self._plots = []
def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 3001 of file plotting.py.

References plotting.PlotGroup._plots, plotting.PlotOnSideGroup._plots, and plotting.Plotter._plots.

3002  def getPlotFolder(self, name):
3003  for item in self._plots:
3004  if item.getName() == name:
3005  return item.getPlotFolder()
3006  raise Exception("No PlotFolder named '%s'" % name)
def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2995 of file plotting.py.

References plotting.PlotGroup._plots, plotting.PlotOnSideGroup._plots, and plotting.Plotter._plots.

2996  def getPlotFolderNames(self):
2997  return [item.getName() for item in self._plots]
def getPlotFolderNames
Definition: plotting.py:2995
def plotting.Plotter.getPlotFolders (   self)

Definition at line 2998 of file plotting.py.

References plotting.PlotGroup._plots, plotting.PlotOnSideGroup._plots, and plotting.Plotter._plots.

2999  def getPlotFolders(self):
3000  return [item.getPlotFolder() for item in self._plots]
def plotting.Plotter.readDirs (   self,
  files 
)
Returns PlotterInstance object, which knows how exactly to produce the plots for these files

Definition at line 3007 of file plotting.py.

References plotting.PlotGroup._plots, plotting.PlotOnSideGroup._plots, and plotting.Plotter._plots.

3008  def readDirs(self, *files):
3009  """Returns PlotterInstance object, which knows how exactly to produce the plots for these files"""
3010  return PlotterInstance([plotterItem.readDirs(files) for plotterItem in self._plots])

Member Data Documentation

plotting.Plotter._plots
private

Definition at line 2973 of file plotting.py.

Referenced by plotting.Plotter.appendTable(), plotting.Plotter.clear(), trackingPlots.TrackingSeedingLayerTable.create(), trackingPlots.TrackingSeedingLayerTable.draw(), plotting.Plotter.getPlotFolder(), plotting.Plotter.getPlotFolderNames(), plotting.Plotter.getPlotFolders(), and plotting.Plotter.readDirs().