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 2971 of file plotting.py.

Constructor & Destructor Documentation

def plotting.Plotter.__init__ (   self)

Definition at line 2973 of file plotting.py.

2974  def __init__(self):
2975  self._plots = []
2976  _setStyle()
2977  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 2978 of file plotting.py.

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

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

Definition at line 2985 of file plotting.py.

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

2986  def appendTable(self, attachToFolder, *args, **kwargs):
2987  for plotterItem in self._plots:
2988  if plotterItem.getName() == attachToFolder:
2989  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2990  return
2991  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 2992 of file plotting.py.

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

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

Definition at line 3002 of file plotting.py.

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

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

Definition at line 2996 of file plotting.py.

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

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

Definition at line 2999 of file plotting.py.

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

3000  def getPlotFolders(self):
3001  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 3008 of file plotting.py.

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

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

Member Data Documentation

plotting.Plotter._plots
private

Definition at line 2974 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().