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

Constructor & Destructor Documentation

def plotting.Plotter.__init__ (   self)

Definition at line 2960 of file plotting.py.

2960  def __init__(self):
2961  self._plots = []
2962  _setStyle()
2963  ROOT.TH1.AddDirectory(False)
2964 
def _setStyle()
Definition: plotting.py:22
def __init__(self)
Definition: plotting.py:2960

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

Referenced by diclist.diclist.add().

2965  def append(self, *args, **kwargs):
2966  """Append a plot folder to the plotter.
2967 
2968  All arguments are forwarded to the constructor of PlotterItem.
2969  """
2970  self._plots.append(PlotterItem(*args, **kwargs))
2971 
def append(self, args, kwargs)
Definition: plotting.py:2965
def plotting.Plotter.appendTable (   self,
  attachToFolder,
  args,
  kwargs 
)

Definition at line 2972 of file plotting.py.

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

2972  def appendTable(self, attachToFolder, *args, **kwargs):
2973  for plotterItem in self._plots:
2974  if plotterItem.getName() == attachToFolder:
2975  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2976  return
2977  raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder)
2978 
def appendTable(self, attachToFolder, args, kwargs)
Definition: plotting.py:2972
def plotting.Plotter.clear (   self)
Remove all plot folders and tables

Definition at line 2979 of file plotting.py.

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

2979  def clear(self):
2980  """Remove all plot folders and tables"""
2981  self._plots = []
2982 
def clear(self)
Definition: plotting.py:2979
def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 2989 of file plotting.py.

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

2989  def getPlotFolder(self, name):
2990  for item in self._plots:
2991  if item.getName() == name:
2992  return item.getPlotFolder()
2993  raise Exception("No PlotFolder named '%s'" % name)
2994 
def getPlotFolder(self, name)
Definition: plotting.py:2989
def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2983 of file plotting.py.

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

2984  return [item.getName() for item in self._plots]
2985 
def getPlotFolderNames(self)
Definition: plotting.py:2983
def plotting.Plotter.getPlotFolders (   self)

Definition at line 2986 of file plotting.py.

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

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

Definition at line 2995 of file plotting.py.

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

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

Member Data Documentation