CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
trackingPlots.TimePerEventPlot Class Reference

Public Member Functions

def __init__ (self, name, timeHisto)
 
def __str__ (self)
 
def create (self, tdirectory)
 

Private Member Functions

def _create (self, tdirectory)
 

Private Attributes

 _cache
 
 _eventsHisto
 
 _name
 
 _timeHisto
 

Detailed Description

Definition at line 1661 of file trackingPlots.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 1662 of file trackingPlots.py.

1662  def __init__(self, name, timeHisto):
1663  self._name = name
1664  self._timeHisto = timeHisto
1665  self._eventsHisto = "path time_real"
1666  self._cache = {}
1667 
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

◆ __str__()

def trackingPlots.TimePerEventPlot.__str__ (   self)

◆ _create()

def trackingPlots.TimePerEventPlot._create (   self,
  tdirectory 
)
private

Definition at line 1671 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, condhdf5tohdf5.H5DataProduct._name, WValidation._name, DrellYanValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, condhdf5tohdf5.H5Tag._name, CutApplicatorBase._name, condhdf5tohdf5.H5GlobalTag._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, conddb2hdf5.DBGlobalTag._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, trackingPlots.TimePerEventPlot._name, SequenceTypes._TaskBasePlaceholder._name, plotting.Plot._name, plotting.PlotGroup._name, plotting.PlotterFolder._name, plotting.PlotterItem._name, trackingPlots.TimePerEventPlot._timeHisto, FastTimerService_cff.range, and python.rootplot.root2matplotlib.replace().

Referenced by trackingPlots.TimePerEventPlot.create().

1671  def _create(self, tdirectory):
1672  timeTh1 = plotting._getOrCreateObject(tdirectory, self._timeHisto)
1673  if timeTh1 is None:
1674  return None
1675 
1676  eventsTh1 = plotting._getOrCreateObject(tdirectory, self._eventsHisto)
1677  if eventsTh1 is None:
1678  return None
1679  nevents = eventsTh1.GetEntries()
1680  if nevents == 0:
1681  return None
1682 
1683  ret = timeTh1.Clone(self._name)
1684  xaxis = ret.GetXaxis()
1685  for i in range(1, ret.GetNbinsX()+1):
1686  ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1687  ret.SetBinError(i, ret.GetBinError(i)/nevents)
1688  xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).replace(" (unscheduled)", ""))
1689  return ret
1690 
def _getOrCreateObject(tdirectory, nameOrCreator)
Definition: plotting.py:57
def replace(string, replacements)

◆ create()

def trackingPlots.TimePerEventPlot.create (   self,
  tdirectory 
)

Definition at line 1691 of file trackingPlots.py.

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

1691  def create(self, tdirectory):
1692  path = tdirectory.GetPath()
1693  if path not in self._cache:
1694  self._cache[path] = self._create(tdirectory)
1695  return self._cache[path]
1696 
def create(alignables, pedeDump, additionalData, outputFile, config)

Member Data Documentation

◆ _cache

trackingPlots.TimePerEventPlot._cache
private

◆ _eventsHisto

trackingPlots.TimePerEventPlot._eventsHisto
private

Definition at line 1665 of file trackingPlots.py.

Referenced by trackingPlots.TimePerEventPlot._create().

◆ _name

trackingPlots.TimePerEventPlot._name
private

◆ _timeHisto

trackingPlots.TimePerEventPlot._timeHisto
private