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

Constructor & Destructor Documentation

◆ __init__()

def plotting.Plotter.__init__ (   self)

Definition at line 2966 of file plotting.py.

2966  def __init__(self):
2967  self._plots = []
2968  _setStyle()
2969  ROOT.TH1.AddDirectory(False)
2970 

Member Function Documentation

◆ append()

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

2971  def append(self, *args, **kwargs):
2972  """Append a plot folder to the plotter.
2973 
2974  All arguments are forwarded to the constructor of PlotterItem.
2975  """
2976  self._plots.append(PlotterItem(*args, **kwargs))
2977 

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

Referenced by diclist.diclist.add().

◆ appendTable()

def plotting.Plotter.appendTable (   self,
  attachToFolder,
args,
**  kwargs 
)

Definition at line 2978 of file plotting.py.

2978  def appendTable(self, attachToFolder, *args, **kwargs):
2979  for plotterItem in self._plots:
2980  if plotterItem.getName() == attachToFolder:
2981  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2982  return
2983  raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder)
2984 

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

◆ clear()

def plotting.Plotter.clear (   self)
Remove all plot folders and tables

Definition at line 2985 of file plotting.py.

2985  def clear(self):
2986  """Remove all plot folders and tables"""
2987  self._plots = []
2988 

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

◆ getPlotFolder()

def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 2995 of file plotting.py.

2995  def getPlotFolder(self, name):
2996  for item in self._plots:
2997  if item.getName() == name:
2998  return item.getPlotFolder()
2999  raise Exception("No PlotFolder named '%s'" % name)
3000 

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

◆ getPlotFolderNames()

def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2989 of file plotting.py.

2989  def getPlotFolderNames(self):
2990  return [item.getName() for item in self._plots]
2991 

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

◆ getPlotFolders()

def plotting.Plotter.getPlotFolders (   self)

Definition at line 2992 of file plotting.py.

2992  def getPlotFolders(self):
2993  return [item.getPlotFolder() for item in self._plots]
2994 

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

◆ readDirs()

def plotting.Plotter.readDirs (   self,
files 
)
Returns PlotterInstance object, which knows how exactly to produce the plots for these files

Definition at line 3001 of file plotting.py.

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

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

Member Data Documentation

◆ _plots

plotting.Plotter._plots
private
plotting._setStyle
def _setStyle()
Definition: plotting.py:22
clear
void clear(HadCaloObj &c)
Definition: data.h:124
Exception
mps_setup.append
append
Definition: mps_setup.py:85