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

Constructor & Destructor Documentation

◆ __init__()

def plotting.Plotter.__init__ (   self)

Definition at line 2951 of file plotting.py.

2951  def __init__(self):
2952  self._plots = []
2953  _setStyle()
2954  ROOT.TH1.AddDirectory(False)
2955 
def _setStyle()
Definition: plotting.py:21
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

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

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

Referenced by diclist.diclist.add().

2956  def append(self, *args, **kwargs):
2957  """Append a plot folder to the plotter.
2958 
2959  All arguments are forwarded to the constructor of PlotterItem.
2960  """
2961  self._plots.append(PlotterItem(*args, **kwargs))
2962 

◆ appendTable()

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

Definition at line 2963 of file plotting.py.

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

2963  def appendTable(self, attachToFolder, *args, **kwargs):
2964  for plotterItem in self._plots:
2965  if plotterItem.getName() == attachToFolder:
2966  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2967  return
2968  raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder)
2969 

◆ clear()

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

Definition at line 2970 of file plotting.py.

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

2970  def clear(self):
2971  """Remove all plot folders and tables"""
2972  self._plots = []
2973 
void clear(EGIsoObj &c)
Definition: egamma.h:82

◆ getPlotFolder()

def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 2980 of file plotting.py.

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

2980  def getPlotFolder(self, name):
2981  for item in self._plots:
2982  if item.getName() == name:
2983  return item.getPlotFolder()
2984  raise Exception("No PlotFolder named '%s'" % name)
2985 

◆ getPlotFolderNames()

def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2974 of file plotting.py.

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

2974  def getPlotFolderNames(self):
2975  return [item.getName() for item in self._plots]
2976 

◆ getPlotFolders()

def plotting.Plotter.getPlotFolders (   self)

Definition at line 2977 of file plotting.py.

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

2977  def getPlotFolders(self):
2978  return [item.getPlotFolder() for item in self._plots]
2979 

◆ readDirs()

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

Definition at line 2986 of file plotting.py.

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

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

Member Data Documentation

◆ _plots