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

Constructor & Destructor Documentation

◆ __init__()

def plotting.Plotter.__init__ (   self)

Definition at line 2972 of file plotting.py.

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

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

2977  def append(self, *args, **kwargs):
2978  """Append a plot folder to the plotter.
2979 
2980  All arguments are forwarded to the constructor of PlotterItem.
2981  """
2982  self._plots.append(PlotterItem(*args, **kwargs))
2983 

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

2984  def appendTable(self, attachToFolder, *args, **kwargs):
2985  for plotterItem in self._plots:
2986  if plotterItem.getName() == attachToFolder:
2987  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2988  return
2989  raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder)
2990 

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

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

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

◆ getPlotFolder()

def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 3001 of file plotting.py.

3001  def getPlotFolder(self, name):
3002  for item in self._plots:
3003  if item.getName() == name:
3004  return item.getPlotFolder()
3005  raise Exception("No PlotFolder named '%s'" % name)
3006 

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

◆ getPlotFolderNames()

def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2995 of file plotting.py.

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

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

◆ getPlotFolders()

def plotting.Plotter.getPlotFolders (   self)

Definition at line 2998 of file plotting.py.

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

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

3007  def readDirs(self, *files):
3008  """Returns PlotterInstance object, which knows how exactly to produce the plots for these files"""
3009  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:21
clear
void clear(HadCaloObj &c)
Definition: data.h:124
Exception
mps_setup.append
append
Definition: mps_setup.py:85