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

Constructor & Destructor Documentation

◆ __init__()

def plotting.Plotter.__init__ (   self)

Definition at line 2974 of file plotting.py.

2974  def __init__(self):
2975  self._plots = []
2976  _setStyle()
2977  ROOT.TH1.AddDirectory(False)
2978 

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

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))
2985 

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

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)
2992 

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

2993  def clear(self):
2994  """Remove all plot folders and tables"""
2995  self._plots = []
2996 

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

◆ getPlotFolder()

def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 3003 of file plotting.py.

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)
3008 

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

◆ getPlotFolderNames()

def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2997 of file plotting.py.

2997  def getPlotFolderNames(self):
2998  return [item.getName() for item in self._plots]
2999 

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

◆ getPlotFolders()

def plotting.Plotter.getPlotFolders (   self)

Definition at line 3000 of file plotting.py.

3000  def getPlotFolders(self):
3001  return [item.getPlotFolder() for item in self._plots]
3002 

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

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])

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