CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
plotting.Plotter Class Reference

Public Member Functions

def __init__
 
def append
 
def appendTable
 
def clear
 
def getPlotFolder
 
def getPlotFolderNames
 
def getPlotFolders
 
def readDirs
 

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

Constructor & Destructor Documentation

def plotting.Plotter.__init__ (   self)

Definition at line 2201 of file plotting.py.

2202  def __init__(self):
2203  self._plots = []
2204 
2205  _absoluteSize = True
2206  if _absoluteSize:
2207  font = 43
2208  titleSize = 22
2209  labelSize = 22
2210  statSize = 14
2211  else:
2212  font = 42
2213  titleSize = 0.05
2214  labelSize = 0.05
2215  statSize = 0.025
2216 
2217  ROOT.gROOT.SetStyle("Plain")
2218  ROOT.gStyle.SetPadRightMargin(0.07)
2219  ROOT.gStyle.SetPadLeftMargin(0.13)
2220  ROOT.gStyle.SetTitleFont(font, "XYZ")
2221  ROOT.gStyle.SetTitleSize(titleSize, "XYZ")
2222  ROOT.gStyle.SetTitleOffset(1.2, "Y")
2223  #ROOT.gStyle.SetTitleFontSize(0.05)
2224  ROOT.gStyle.SetLabelFont(font, "XYZ")
2225  ROOT.gStyle.SetLabelSize(labelSize, "XYZ")
2226  ROOT.gStyle.SetTextSize(labelSize)
2227  ROOT.gStyle.SetStatFont(font)
2228  ROOT.gStyle.SetStatFontSize(statSize)
2229 
2230  ROOT.TH1.AddDirectory(False)
2231  ROOT.TGaxis.SetMaxDigits(4)

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

Referenced by diclist.diclist.add(), and BeautifulSoup.Tag.setString().

2233  def append(self, *args, **kwargs):
2234  """Append a plot folder to the plotter.
2235 
2236  All arguments are forwarded to the constructor of PlotterItem.
2237  """
2238  self._plots.append(PlotterItem(*args, **kwargs))
def plotting.Plotter.appendTable (   self,
  attachToFolder,
  args,
  kwargs 
)

Definition at line 2239 of file plotting.py.

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

2240  def appendTable(self, attachToFolder, *args, **kwargs):
2241  for plotterItem in self._plots:
2242  if plotterItem.getName() == attachToFolder:
2243  plotterItem.appendTableCreator(PlotterTableItem(*args, **kwargs))
2244  return
2245  raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder)
def plotting.Plotter.clear (   self)
Remove all plot folders and tables

Definition at line 2246 of file plotting.py.

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

2247  def clear(self):
2248  """Remove all plot folders and tables"""
2249  self._plots = []
def plotting.Plotter.getPlotFolder (   self,
  name 
)

Definition at line 2256 of file plotting.py.

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

2257  def getPlotFolder(self, name):
2258  for item in self._plots:
2259  if item.getName() == name:
2260  return item.getPlotFolder()
2261  raise Exception("No PlotFolder named '%s'" % name)
def plotting.Plotter.getPlotFolderNames (   self)

Definition at line 2250 of file plotting.py.

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

2251  def getPlotFolderNames(self):
2252  return [item.getName() for item in self._plots]
def getPlotFolderNames
Definition: plotting.py:2250
def plotting.Plotter.getPlotFolders (   self)

Definition at line 2253 of file plotting.py.

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

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

Definition at line 2262 of file plotting.py.

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

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

Member Data Documentation

plotting.Plotter._plots
private

Definition at line 2202 of file plotting.py.

Referenced by plotting.Plotter.appendTable(), plotting.Plotter.clear(), plotting.Plotter.getPlotFolder(), plotting.Plotter.getPlotFolderNames(), plotting.Plotter.getPlotFolders(), and plotting.Plotter.readDirs().