CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def __str__
 
def create
 

Private Member Functions

def _create
 

Private Attributes

 _cache
 
 _eventsHisto
 
 _name
 
 _timeHisto
 

Detailed Description

Definition at line 1643 of file trackingPlots.py.

Constructor & Destructor Documentation

def trackingPlots.TimePerEventPlot.__init__ (   self,
  name,
  timeHisto 
)

Member Function Documentation

def trackingPlots.TimePerEventPlot.__str__ (   self)

Definition at line 1650 of file trackingPlots.py.

References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, DrellYanValidation._name, WValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, CutApplicatorBase._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, SequenceTypes.SequencePlaceholder._name, plotting.Subtract._name, plotting.Transform._name, plotting.FakeDuplicate._name, plotting.CutEfficiency._name, plotting.AggregateBins._name, plotting.AggregateHistos._name, plotting.ROC._name, trackingPlots.Iteration._name, SequenceTypes.TaskPlaceholder._name, trackingPlots.TimePerEventPlot._name, plotting.Plot._name, plotting.PlotGroup._name, plotting.PlotterFolder._name, and plotting.PlotterItem._name.

1651  def __str__(self):
1652  return self._name
def trackingPlots.TimePerEventPlot._create (   self,
  tdirectory 
)
private

Definition at line 1653 of file trackingPlots.py.

References trackingPlots.TimePerEventPlot._eventsHisto, plotting._getOrCreateObject(), FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, DrellYanValidation._name, WValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, CutApplicatorBase._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, SequenceTypes.SequencePlaceholder._name, plotting.Subtract._name, plotting.Transform._name, plotting.FakeDuplicate._name, plotting.CutEfficiency._name, plotting.AggregateBins._name, plotting.AggregateHistos._name, plotting.ROC._name, trackingPlots.Iteration._name, SequenceTypes.TaskPlaceholder._name, trackingPlots.TimePerEventPlot._name, plotting.Plot._name, plotting.PlotGroup._name, plotting.PlotterFolder._name, plotting.PlotterItem._name, trackingPlots.TimePerEventPlot._timeHisto, sistrip::SpyUtilities.range(), and python.rootplot.root2matplotlib.replace().

Referenced by trackingPlots.TimePerEventPlot.create().

1654  def _create(self, tdirectory):
1655  timeTh1 = plotting._getOrCreateObject(tdirectory, self._timeHisto)
1656  if timeTh1 is None:
1657  return None
1658 
1659  eventsTh1 = plotting._getOrCreateObject(tdirectory, self._eventsHisto)
1660  if eventsTh1 is None:
1661  return None
1662  nevents = eventsTh1.GetEntries()
1663  if nevents == 0:
1664  return None
1665 
1666  ret = timeTh1.Clone(self._name)
1667  xaxis = ret.GetXaxis()
1668  for i in range(1, ret.GetNbinsX()+1):
1669  ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1670  ret.SetBinError(i, ret.GetBinError(i)/nevents)
1671  xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).replace(" (unscheduled)", ""))
1672  return ret
const uint16_t range(const Frame &aFrame)
def _getOrCreateObject
Definition: plotting.py:57
def trackingPlots.TimePerEventPlot.create (   self,
  tdirectory 
)

Definition at line 1673 of file trackingPlots.py.

References DTCache< T, Coll >._cache, tkal_create_file_lists.FileListCreator._cache, L1MuDTTrackFinder._cache, L1MuBMTrackFinder._cache, DTTrig._cache, trackingPlots.TimePerEventPlot._cache, and trackingPlots.TimePerEventPlot._create().

1674  def create(self, tdirectory):
1675  path = tdirectory.GetPath()
1676  if path not in self._cache:
1677  self._cache[path] = self._create(tdirectory)
1678  return self._cache[path]

Member Data Documentation

trackingPlots.TimePerEventPlot._cache
private

Definition at line 1648 of file trackingPlots.py.

Referenced by trackingPlots.TrackingIterationOrder.__call__(), and trackingPlots.TimePerEventPlot.create().

trackingPlots.TimePerEventPlot._eventsHisto
private

Definition at line 1647 of file trackingPlots.py.

Referenced by trackingPlots.TimePerEventPlot._create().

trackingPlots.TimePerEventPlot._name
private

Definition at line 1645 of file trackingPlots.py.

Referenced by trackingPlots.TimePerEventPlot.__str__(), trackingPlots.TimePerTrackPlot.__str__(), trackingPlots.TimePerEventPlot._create(), trackingPlots.TimePerTrackPlot.create(), and validation.SimpleSample.name().

trackingPlots.TimePerEventPlot._timeHisto
private

Definition at line 1646 of file trackingPlots.py.

Referenced by trackingPlots.TimePerEventPlot._create(), and trackingPlots.TimePerTrackPlot.create().