CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
plotting.PlotOnSideGroup Class Reference
Inheritance diagram for plotting.PlotOnSideGroup:
plotting.PlotGroup

Public Member Functions

def __init__ (self, name, plot, ncols=2, onlyForPileup=False)
 
def append (self, *args, **kwargs)
 
def create (self, tdirectoryNEvents, requireAllHistograms=False)
 
def draw (self, *args, **kwargs)
 
- Public Member Functions inherited from plotting.PlotGroup
def __init__ (self, name, plots, **kwargs)
 
def append (self, plot)
 
def clear (self)
 
def draw (self, legendLabels, prefix=None, separate=False, saveFormat=".pdf", ratio=True, directory="")
 
def getName (self)
 
def getPlot (self, name)
 
def getPlots (self)
 
def onlyForPileup (self)
 
def remove (self, name)
 
def setProperties (self, **kwargs)
 

Private Attributes

 _plot
 
 _plots
 

Detailed Description

Resembles DQM GUI's "On side" layout.

Like PlotGroup, but has only a description of a single plot. The
plot is drawn separately for each file. Useful for 2D histograms.

Definition at line 2523 of file plotting.py.

Constructor & Destructor Documentation

◆ __init__()

def plotting.PlotOnSideGroup.__init__ (   self,
  name,
  plot,
  ncols = 2,
  onlyForPileup = False 
)

Definition at line 2529 of file plotting.py.

2529  def __init__(self, name, plot, ncols=2, onlyForPileup=False):
2530  super(PlotOnSideGroup, self).__init__(name, [], ncols=ncols, legend=False, onlyForPileup=onlyForPileup)
2531  self._plot = plot
2532  self._plot.setProperties(ratio=False)
2533 

Member Function Documentation

◆ append()

def plotting.PlotOnSideGroup.append (   self,
args,
**  kwargs 
)

Definition at line 2534 of file plotting.py.

2534  def append(self, *args, **kwargs):
2535  raise Exception("PlotOnSideGroup.append() is not implemented")
2536 

Referenced by diclist.diclist.add().

◆ create()

def plotting.PlotOnSideGroup.create (   self,
  tdirectoryNEvents,
  requireAllHistograms = False 
)
Create histograms from a list of TDirectories.

Arguments:
tdirectoryNEvents    -- List of (TDirectory, nevents) pairs
requireAllHistograms -- If True, a plot is produced if histograms from all files are present (default: False)

Reimplemented from plotting.PlotGroup.

Definition at line 2537 of file plotting.py.

2537  def create(self, tdirectoryNEvents, requireAllHistograms=False):
2538  self._plots = []
2539  for i, element in enumerate(tdirectoryNEvents):
2540  pl = self._plot.clone()
2541  pl.create([element], requireAllHistograms)
2542  pl.setName(pl.getName()+"_"+str(i))
2543  self._plots.append(pl)
2544 

◆ draw()

def plotting.PlotOnSideGroup.draw (   self,
args,
**  kwargs 
)

Definition at line 2545 of file plotting.py.

2545  def draw(self, *args, **kwargs):
2546  kargs = copy.copy(kwargs)
2547  kargs["ratio"] = False
2548  return super(PlotOnSideGroup, self).draw(*args, **kargs)
2549 

Member Data Documentation

◆ _plot

plotting.PlotOnSideGroup._plot
private

Definition at line 2531 of file plotting.py.

◆ _plots

plotting.PlotOnSideGroup._plots
private
ntuplePlotting.draw
def draw(name, histos, styles=_defaultStyles, legendLabels=[], **kwargs)
Definition: ntuplePlotting.py:24
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
str
#define str(s)
Definition: TestProcessor.cc:53
Exception
mps_setup.append
append
Definition: mps_setup.py:85