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

Constructor & Destructor Documentation

def plotting.Plotter.__init__ (   self)

Definition at line 2956 of file plotting.py.

2956  def __init__(self):
2957  self._plots = []
2958  _setStyle()
2959  ROOT.TH1.AddDirectory(False)
2960 
def _setStyle()
Definition: plotting.py:19
def __init__(self)
Definition: plotting.py:2956

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

Referenced by diclist.diclist.add().

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

Definition at line 2968 of file plotting.py.

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

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

Definition at line 2975 of file plotting.py.

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

2975  def clear(self):
2976  """Remove all plot folders and tables"""
2977  self._plots = []
2978 
def clear(self)
Definition: plotting.py:2975
def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 2985 of file plotting.py.

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

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

Definition at line 2979 of file plotting.py.

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

2980  return [item.getName() for item in self._plots]
2981 
def getPlotFolderNames(self)
Definition: plotting.py:2979
def plotting.Plotter.getPlotFolders (   self)

Definition at line 2982 of file plotting.py.

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

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

Definition at line 2991 of file plotting.py.

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

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

Member Data Documentation