CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
plotting.Plotter Class Reference

Public Member Functions

def __init__ (self)
 
def append (self, args, kwargs)
 
def appendTable (self, attachToFolder, args, kwargs)
 
def clear (self)
 
def getPlotFolder (self, name)
 
def getPlotFolderNames (self)
 
def getPlotFolders (self)
 
def readDirs (self, files)
 

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

Constructor & Destructor Documentation

def plotting.Plotter.__init__ (   self)

Definition at line 2778 of file plotting.py.

2778  def __init__(self):
2779  self._plots = []
2780  _setStyle()
2781  ROOT.TH1.AddDirectory(False)
2782 
def _setStyle()
Definition: plotting.py:17
def __init__(self)
Definition: plotting.py:2778

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

Referenced by diclist.diclist.add().

2783  def append(self, *args, **kwargs):
2784  """Append a plot folder to the plotter.
2785 
2786  All arguments are forwarded to the constructor of PlotterItem.
2787  """
2788  self._plots.append(PlotterItem(*args, **kwargs))
2789 
def append(self, args, kwargs)
Definition: plotting.py:2783
def plotting.Plotter.appendTable (   self,
  attachToFolder,
  args,
  kwargs 
)

Definition at line 2790 of file plotting.py.

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

2790  def appendTable(self, attachToFolder, *args, **kwargs):
2791  for plotterItem in self._plots:
2792  if plotterItem.getName() == attachToFolder:
2793  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2794  return
2795  raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder)
2796 
def appendTable(self, attachToFolder, args, kwargs)
Definition: plotting.py:2790
def plotting.Plotter.clear (   self)
Remove all plot folders and tables

Definition at line 2797 of file plotting.py.

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

2797  def clear(self):
2798  """Remove all plot folders and tables"""
2799  self._plots = []
2800 
def clear(self)
Definition: plotting.py:2797
def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 2807 of file plotting.py.

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

2807  def getPlotFolder(self, name):
2808  for item in self._plots:
2809  if item.getName() == name:
2810  return item.getPlotFolder()
2811  raise Exception("No PlotFolder named '%s'" % name)
2812 
def getPlotFolder(self, name)
Definition: plotting.py:2807
def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2801 of file plotting.py.

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

2802  return [item.getName() for item in self._plots]
2803 
def getPlotFolderNames(self)
Definition: plotting.py:2801
def plotting.Plotter.getPlotFolders (   self)

Definition at line 2804 of file plotting.py.

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

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

Definition at line 2813 of file plotting.py.

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

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

Member Data Documentation