CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ntupleDataFormat._Object Class Reference
Inheritance diagram for ntupleDataFormat._Object:
ntupleDataFormat._HitObject ntupleDataFormat.GluedHit ntupleDataFormat.InvalidHit ntupleDataFormat.Seed ntupleDataFormat.SeedMatchInfo ntupleDataFormat.SimHit ntupleDataFormat.SimHitMatchInfo ntupleDataFormat.Track ntupleDataFormat.TrackingParticle ntupleDataFormat.TrackingParticleMatchInfo ntupleDataFormat.TrackingVertex ntupleDataFormat.TrackMatchInfo ntupleDataFormat.Vertex

Public Member Functions

def __getattr__ (self, attr)
 
def __init__ (self, tree, index, prefix)
 
def index (self)
 
def isValid (self)
 

Private Member Functions

def _checkIsValid (self)
 

Private Attributes

 _index
 
 _prefix
 
 _tree
 

Detailed Description

Adaptor class representing a single object in a collection.

The member variables of the object are obtained from the branches
with common prefix and a given index.

Concrete object classes should inherit from this class.

Definition at line 47 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

◆ __init__()

def ntupleDataFormat._Object.__init__ (   self,
  tree,
  index,
  prefix 
)
Constructor.

Arguments:
tree   -- TTree object
index  -- Index for this object
prefix -- Prefix of the branchs

Reimplemented in ntupleDataFormat._HitObject.

Definition at line 55 of file ntupleDataFormat.py.

55  def __init__(self, tree, index, prefix):
56  """Constructor.
57 
58  Arguments:
59  tree -- TTree object
60  index -- Index for this object
61  prefix -- Prefix of the branchs
62  """
63  super(_Object, self).__init__()
64  self._tree = tree
65  self._index = index
66  self._prefix = prefix
67 

Member Function Documentation

◆ __getattr__()

def ntupleDataFormat._Object.__getattr__ (   self,
  attr 
)
Return object member variable.

'attr' is translated as a branch in the TTree (<prefix>_<attr>).

Reimplemented in ntupleDataFormat.TrackMatchInfo, ntupleDataFormat.TrackingParticleMatchInfo, and ntupleDataFormat.SimHitMatchInfo.

Definition at line 68 of file ntupleDataFormat.py.

68  def __getattr__(self, attr):
69  """Return object member variable.
70 
71  'attr' is translated as a branch in the TTree (<prefix>_<attr>).
72  """
73  self._checkIsValid()
74  val = getattr(self._tree, self._prefix+"_"+attr)[self._index]
75  return lambda: val
76 

References ntupleDataFormat._Object._checkIsValid(), SeedingNode< DATA >._index, RPCMuonExtraStruct._index, ntupleDataFormat._Object._index, python.cmstools.EventTree._index, python.cmstools.EventBranch._index, html.HtmlReport._index, CommonAnalyzer._prefix, ntupleDataFormat._Object._prefix, html.PageSet._prefix, ntupleDataFormat._Collection._tree, ntupleDataFormat._Object._tree, and python.cmstools.EventTree._tree.

◆ _checkIsValid()

def ntupleDataFormat._Object._checkIsValid (   self)
private
Raise an exception if the object index is not valid.

Definition at line 77 of file ntupleDataFormat.py.

77  def _checkIsValid(self):
78  """Raise an exception if the object index is not valid."""
79  if not self.isValid():
80  raise Exception("%s is not valid" % self.__class__.__name__)
81 

References __class__< T >.__class__(), edm::FileFormatVersion.isValid(), MeasurementDetWithData.isValid(), reco::PFMultiLinksTC.isValid, edm::FileID.isValid(), ExtendedPerigeeTrajectoryError.isValid(), TtSemiLepJetCombMaxSumPtWMass.isValid(), GlobalParametersWithPath.isValid(), TtSemiLepJetCombGeom.isValid(), TtSemiLepJetCombWMassMaxSumPt.isValid(), edm::BranchID.isValid(), DetIdSelector.isValid(), TtSemiLepJetCombWMassDeltaTopMass.isValid(), GEMCoPadDigi.isValid(), GEMDigi.isValid(), GEMPadDigi.isValid(), fftjetcms::EtaAndPtDependentPeakSelector.isValid(), edm::ElementID.isValid(), SeedFromProtoTrack.isValid(), GEMPadDigiCluster.isValid(), reco::TrackGhostTrackState.isValid(), ExtendedPerigeeTrajectoryParameters.isValid(), MediumProperties.isValid(), DaqScopeModeAnalysis.isValid(), SubLayerCrossings.isValid(), TwoBodyDecayTrajectoryState.isValid(), FastLine.isValid(), ConversionFastHelix.isValid(), ApvTimingAnalysis.isValid(), CalibrationScanAnalysis.isValid(), CSCALCTPreTriggerDigi.isValid(), NoiseAnalysis.isValid(), OptoScanAnalysis.isValid(), PedestalsAnalysis.isValid(), PedsOnlyAnalysis.isValid(), VpspScanAnalysis.isValid(), cms::MD5Result.isValid(), edm::ProductID.isValid(), FiducialVolume.isValid(), PedsFullNoiseAnalysis.isValid(), FastFedCablingAnalysis.isValid(), FedCablingAnalysis.isValid(), BeamConfiguration.isValid(), PFGsfHelper.isValid(), CSCCLCTPreTriggerDigi.isValid(), SiStripNullKey.isValid(), DTOccupancyCluster.isValid(), MillePedeVariables.isValid(), GammaNumericalGenerator.isValid(), CSCALCTDigi.isValid(), LumiDetails.isValid(), CalibrationAnalysis.isValid(), PerigeeKinematicState.isValid(), cond::persistency::BasePayloadProxy.isValid(), LMFRunTag.isValid(), CovarianceParameterization.isValid(), HLTTauDQMPlotter.isValid(), PixelForwardLayer::SubTurbineCrossings.isValid, GenericProjectedRecHit2D.isValid(), KinematicParametersError.isValid(), cms::cuda::ProductBase.isValid(), reco::BasicGhostTrackState.isValid(), HLTTauDQMPath.isValid(), PixelForwardLayerPhase1::SubTurbineCrossings.isValid, reco::GhostTrackState.isValid(), edm::test::TestHandle< T >.isValid(), dqmoffline::l1t::L1TDiffHarvesting::L1TDiffPlotHandler.isValid(), fwlite::ESHandle< T >.isValid(), edm::ESHandleBase.isValid(), L1MuonPixelTrackFitter::Circle.isValid(), BasicVertexState.isValid(), CSCCLCTDigi.isValid(), l1t::CaloCluster.isValid(), TwoBodyDecay.isValid(), HcalLayerDepthMap.isValid(), CommissioningAnalysis.isValid(), edmNew::DetSet< T >.isValid(), PixelKeys.isValid(), LMFColor.isValid(), LMFUnique.isValid(), FastCircle.isValid(), KinematicTree.isValid(), TrajectoryStateClosestToBeamLine.isValid(), CSCCorrelatedLCTDigi.isValid(), HcalHPDRBXMap.isValid(), cond::Iov_t.isValid(), FWRepresentationInfo.isValid(), edm::TriggerResultsByName.isValid(), SeedFromNuclearInteraction.isValid(), edm::OrphanHandleBase.isValid(), TrajectoryStateOnSurface.isValid(), HGCalDetId.isValid(), LMFSeqDat.isValid(), edm::RefToBaseVector< T >.isValid(), TtFullHadHypothesis.isValid(), FastHelix.isValid(), npstat::ArrayNDScanner.isValid(), SummaryPlot.isValid(), LMFRunIOV.isValid(), TtFullLepHypothesis.isValid(), CTPPSTimingLocalTrack.isValid(), edm::RootOutputTree.isValid(), LMFClsDat.isValid(), fwlite::Handle< T >.isValid(), KinematicParameters.isValid(), AlgoMuon.isValid(), LMFLaserPulseDat.isValid(), edm::Hash< I >.isValid(), SteppingHelixStateInfo.isValid(), sistrip::SpyUtilities.isValid(), L1TBeamConfiguration.isValid(), LMFPnPrimDat.isValid(), npstat::BoxNDScanner< Numeric >.isValid(), SiStripKey.isValid(), edm::BasicHandle.isValid(), ProxyBase11< T >.isValid(), TtSemiLepHypothesis.isValid(), edm::HandleBase.isValid(), StripKeys.isValid(), BasicSingleVertexState.isValid(), reco::Vertex.isValid(), ME0TriggerDigi.isValid(), SurveyPxbImage.isValid(), fwlite::ChainEvent.isValid(), OmniClusterRef.isValid(), python.Handle.isValid(), fwlite::Run.isValid(), KinematicState.isValid(), fwlite::LuminosityBlock.isValid(), ntupleDataFormat._Object.isValid(), reco::PFTrajectoryPoint.isValid(), fwlite::MultiChainEvent.isValid(), SiStripDetKey.isValid(), UCTDAQRawData.isValid(), rpccppf::TXRecord.isValid(), BasicMultiVertexState.isValid(), edm::Handle< GenericObject >.isValid(), LMFPrimDat.isValid(), reco::PFDisplacedVertexCandidate.isValid(), VertexState.isValid(), pat::JetCorrFactors.isValid(), edm::Handle< FWGenericObject >.isValid(), DDBase< N, C >.isValid(), METCorrectorParameters.isValid(), MEtXYcorrectParameters.isValid(), AlignmentParameters.isValid(), TrajectoryStateClosestToPoint.isValid(), PlotCompareUtility.isValid(), edm::RootTree.isValid(), rpcamc13::AMCHeader.isValid(), JetCorrectorParameters.isValid(), SiStripFecKey.isValid(), LumiSummary.isValid(), SiStripFedKey.isValid(), LMFDat.isValid(), TotemRPLocalTrack.isValid(), PerigeeLinearizedTrackState.isValid(), LinearizedTrackState< N >.isValid(), TrackingRecHit.isValid(), ReferenceTrajectoryBase.isValid(), rpctwinmux::BlockAMCContent.isValid(), reco::TransientTrack.isValid(), fwlite::Event.isValid(), edm::reftobase::BaseVectorHolder< T >::const_iterator.isValid(), rpcamc13::AMCPayload.isValid(), CachingVertex< N >.isValid(), edm::reftobase::RefVectorHolderBase::const_iterator.isValid(), edmNew::dstvdetails::DetSetVectorTrans::Item.isValid(), L1GtUtils::LogicalExpressionL1Results.isValid(), CTPPSPixelLocalTrack.isValid(), cmdline::OneShotIStream.isValid(), BasicTrajectoryState.isValid(), TransientVertex.isValid(), dqm::impl::MonitorElement.isValid(), TempTrajectory.isValid(), Trajectory.isValid(), and edmNew::DetSetVector< T >.isValid().

Referenced by ntupleDataFormat._Object.__getattr__(), ntupleDataFormat.TrackingParticle.bestMatchingTrack(), ntupleDataFormat.TrackingVertex.daughterTrackingParticles(), ntupleDataFormat.TrackingParticle.decayVertices(), ntupleDataFormat._DetIdStrAdaptor.detIdStr(), ntupleDataFormat._RecoHitAdaptor.gluedHits(), ntupleDataFormat.Seed.indexWithinAlgo(), ntupleDataFormat._RecoHitAdaptor.invalidHits(), ntupleDataFormat.TrackingParticle.isLooper(), ntupleDataFormat._DetIdStrAdaptor.layerStr(), ntupleDataFormat.TrackingParticle.matchedSeedInfos(), ntupleDataFormat._SimHitMatchAdaptor.matchedSimHitInfos(), ntupleDataFormat.TrackingParticle.matchedTrackInfos(), ntupleDataFormat._TrackingParticleMatchAdaptor.matchedTrackingParticleInfos(), ntupleDataFormat.GluedHit.monoHit(), ntupleDataFormat.TrackingVertex.nDaughterTrackingParticles(), ntupleDataFormat.TrackingParticle.nMatchedSeeds(), ntupleDataFormat._SimHitMatchAdaptor.nMatchedSimHits(), ntupleDataFormat._TrackingParticleMatchAdaptor.nMatchedTrackingParticles(), ntupleDataFormat.TrackingParticle.nMatchedTracks(), ntupleDataFormat.SimHit.nRecHits(), ntupleDataFormat._HitObject.nseeds(), ntupleDataFormat.GluedHit.nseeds(), ntupleDataFormat.TrackingParticle.nSimHits(), ntupleDataFormat.TrackingVertex.nSourceTrackingParticles(), ntupleDataFormat._HitObject.ntracks(), ntupleDataFormat.Vertex.nTracks(), ntupleDataFormat.TrackingParticle.parentVertex(), ntupleDataFormat._RecoHitAdaptor.phase2OTHits(), ntupleDataFormat._RecoHitAdaptor.pixelHits(), ntupleDataFormat.SeedMatchInfo.seed(), ntupleDataFormat.Track.seed(), ntupleDataFormat._HitObject.seeds(), ntupleDataFormat.GluedHit.seeds(), ntupleDataFormat.SimHitMatchInfo.simHit(), ntupleDataFormat.TrackingParticle.simHits(), ntupleDataFormat.TrackingVertex.sourceTrackingParticles(), ntupleDataFormat.GluedHit.stereoHit(), ntupleDataFormat._RecoHitAdaptor.stripHits(), ntupleDataFormat.Seed.track(), ntupleDataFormat.SimHit.trackingParticle(), ntupleDataFormat._HitObject.tracks(), ntupleDataFormat.Vertex.tracks(), and ntupleDataFormat.Track.vertex().

◆ index()

def ntupleDataFormat._Object.index (   self)
Return object index.

Definition at line 86 of file ntupleDataFormat.py.

86  def index(self):
87  """Return object index."""
88  return self._index
89 

References SeedingNode< DATA >._index, RPCMuonExtraStruct._index, ntupleDataFormat._Object._index, python.cmstools.EventTree._index, python.cmstools.EventBranch._index, and html.HtmlReport._index.

Referenced by BeautifulSoup.PageElement.insert().

◆ isValid()

def ntupleDataFormat._Object.isValid (   self)
Check if object index is valid.

Definition at line 82 of file ntupleDataFormat.py.

82  def isValid(self):
83  """Check if object index is valid."""
84  return self._index != -1
85 

References SeedingNode< DATA >._index, RPCMuonExtraStruct._index, ntupleDataFormat._Object._index, python.cmstools.EventTree._index, python.cmstools.EventBranch._index, and html.HtmlReport._index.

Referenced by ntupleDataFormat._Object._checkIsValid(), and core.AutoHandle.AutoHandle.ReallyLoad().

Member Data Documentation

◆ _index

ntupleDataFormat._Object._index
private

Definition at line 65 of file ntupleDataFormat.py.

Referenced by ntupleDataFormat._Object.__getattr__(), ntupleDataFormat.TrackingParticle._nMatchedSeeds(), ntupleDataFormat._SimHitMatchAdaptor._nMatchedSimHits(), ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles(), ntupleDataFormat.TrackingParticle._nMatchedTracks(), ntupleDataFormat.TrackingVertex.daughterTrackingParticles(), ntupleDataFormat.TrackingParticle.decayVertices(), ntupleDataFormat._DetIdStrAdaptor.detIdStr(), ntupleDataFormat._Object.index(), ntupleDataFormat.Seed.indexWithinAlgo(), ntupleDataFormat._Object.isValid(), ntupleDataFormat._DetIdStrAdaptor.layerStr(), ntupleDataFormat.InvalidHit.layerStr(), ntupleDataFormat.TrackingParticle.matchedSeedInfos(), ntupleDataFormat._SimHitMatchAdaptor.matchedSimHitInfos(), ntupleDataFormat.TrackingParticle.matchedTrackInfos(), ntupleDataFormat._TrackingParticleMatchAdaptor.matchedTrackingParticleInfos(), ntupleDataFormat.GluedHit.monoHit(), ntupleDataFormat.TrackingVertex.nDaughterTrackingParticles(), ntupleDataFormat.SimHit.nRecHits(), ntupleDataFormat._HitObject.nseeds(), ntupleDataFormat.GluedHit.nseeds(), ntupleDataFormat.TrackingVertex.nSourceTrackingParticles(), ntupleDataFormat._HitObject.ntracks(), ntupleDataFormat.Vertex.nTracks(), ntupleDataFormat.TrackingParticle.parentVertex(), ntupleDataFormat.SeedMatchInfo.seed(), ntupleDataFormat.Track.seed(), ntupleDataFormat._HitObject.seeds(), ntupleDataFormat.GluedHit.seeds(), ntupleDataFormat.SimHitMatchInfo.simHit(), ntupleDataFormat.TrackingVertex.sourceTrackingParticles(), ntupleDataFormat.GluedHit.stereoHit(), ntupleDataFormat.Seed.track(), ntupleDataFormat.SimHit.trackingParticle(), ntupleDataFormat._HitObject.tracks(), ntupleDataFormat.Vertex.tracks(), and ntupleDataFormat.Track.vertex().

◆ _prefix

ntupleDataFormat._Object._prefix
private

Definition at line 66 of file ntupleDataFormat.py.

Referenced by ntupleDataFormat._Object.__getattr__(), ntupleDataFormat.BeamSpot.__getattr__(), ntuplePrintersDiff._IndentPrinter._indent(), ntupleDataFormat._SimHitMatchAdaptor._nMatchedSimHits(), ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles(), ntuplePrintersDiff._RecHitPrinter._printHits(), ntuplePrintersDiff.TrackingParticlePrinter._printMatchedSeeds0(), ntuplePrintersDiff.TrackingParticlePrinter._printMatchedSeedsHeader(), ntuplePrintersDiff.TrackingParticlePrinter._printMatchedTracks(), ntuplePrintersDiff.TrackingParticlePrinter._printMatchedTracksHeader(), ntuplePrintersDiff.TrackingParticlePrinter._printTP(), ntupleDataFormat._DetIdStrAdaptor.detIdStr(), ntuplePrintersDiff.SeedPrinter.diff(), ntuplePrintersDiff.TrackPrinter.diff(), ntuplePrintersDiff._IndentPrinter.indent(), ntupleDataFormat._DetIdStrAdaptor.layerStr(), ntupleDataFormat.TrackingParticle.matchedSeedInfos(), ntupleDataFormat._SimHitMatchAdaptor.matchedSimHitInfos(), ntupleDataFormat.TrackingParticle.matchedTrackInfos(), ntupleDataFormat._TrackingParticleMatchAdaptor.matchedTrackingParticleInfos(), ntupleDataFormat._HitObject.nseeds(), ntupleDataFormat._HitObject.ntracks(), ntuplePrintersDiff.SeedPrinter.printHeader(), ntuplePrintersDiff.TrackPrinter.printHeader(), ntuplePrintersDiff.SeedPrinter.printHits(), ntuplePrintersDiff.TrackPrinter.printHits(), ntuplePrintersDiff.TrackingParticlePrinter.printHits(), ntuplePrintersDiff.SeedPrinter.printMatchedTrackingParticles(), ntuplePrintersDiff.TrackPrinter.printMatchedTrackingParticles(), ntuplePrintersDiff.TrackingParticlePrinter.printMatchedTracks(), ntuplePrintersDiff.TrackingParticlePrinter.printTrackingParticle(), ntuplePrintersDiff._IndentPrinter.restoreIndent(), ntupleDataFormat.SeedMatchInfo.seed(), ntupleDataFormat._HitObject.seeds(), ntuplePrintersDiff._IndentPrinter.setIndentFrom(), ntupleDataFormat.SimHitMatchInfo.simHit(), ntupleDataFormat.SimHit.trackingParticle(), and ntupleDataFormat._HitObject.tracks().

◆ _tree

ntupleDataFormat._Object._tree
private

Definition at line 64 of file ntupleDataFormat.py.

Referenced by ntupleDataFormat._Object.__getattr__(), ntupleDataFormat.BeamSpot.__getattr__(), ntupleDataFormat.TrackingNtuple.__iter__(), ntupleDataFormat.TrackingParticle._nMatchedSeeds(), ntupleDataFormat._SimHitMatchAdaptor._nMatchedSimHits(), ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles(), ntupleDataFormat.TrackingParticle._nMatchedTracks(), ntupleDataFormat.Event.beamspot(), ntupleDataFormat.TrackingParticle.bestMatchingTrack(), ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticle(), ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleFromFirstHit(), ntupleDataFormat.TrackingVertex.daughterTrackingParticles(), ntupleDataFormat.TrackingParticle.decayVertices(), ntupleDataFormat._DetIdStrAdaptor.detIdStr(), ntupleDataFormat.Event.event(), ntupleDataFormat.Event.eventId(), ntupleDataFormat.TrackingNtuple.getEvent(), ntupleDataFormat._RecoHitAdaptor.gluedHits(), ntupleDataFormat.Event.gluedHits(), ntupleDataFormat.TrackingNtuple.hasHits(), ntupleDataFormat.TrackingNtuple.hasSeeds(), ntupleDataFormat._RecoHitAdaptor.hits(), ntupleDataFormat.Seed.indexWithinAlgo(), ntupleDataFormat._RecoHitAdaptor.invalidHits(), ntupleDataFormat.TrackingParticle.isLooper(), ntupleDataFormat._DetIdStrAdaptor.layerStr(), ntupleDataFormat.InvalidHit.layerStr(), ntupleDataFormat.Event.lumi(), ntupleDataFormat.TrackingParticle.matchedSeedInfos(), ntupleDataFormat._SimHitMatchAdaptor.matchedSimHitInfos(), ntupleDataFormat.TrackingParticle.matchedTrackInfos(), ntupleDataFormat._TrackingParticleMatchAdaptor.matchedTrackingParticleInfos(), ntupleDataFormat.GluedHit.monoHit(), ntupleDataFormat.TrackingVertex.nDaughterTrackingParticles(), ntupleDataFormat.SimHit.nRecHits(), ntupleDataFormat._HitObject.nseeds(), ntupleDataFormat.GluedHit.nseeds(), ntupleDataFormat.TrackingVertex.nSourceTrackingParticles(), ntupleDataFormat._HitObject.ntracks(), ntupleDataFormat.Vertex.nTracks(), ntupleDataFormat.TrackingParticle.parentVertex(), ntupleDataFormat._RecoHitAdaptor.phase2OTHits(), ntupleDataFormat.Event.phase2OTHits(), ntupleDataFormat._RecoHitAdaptor.pixelHits(), ntupleDataFormat.Event.pixelHits(), ntupleDataFormat.Event.run(), ntupleDataFormat.SeedMatchInfo.seed(), ntupleDataFormat.Track.seed(), ntupleDataFormat._HitObject.seeds(), ntupleDataFormat.Event.seeds(), ntupleDataFormat.GluedHit.seeds(), ntupleDataFormat.SimHitMatchInfo.simHit(), ntupleDataFormat.TrackingParticle.simHits(), ntupleDataFormat.TrackingVertex.sourceTrackingParticles(), ntupleDataFormat.GluedHit.stereoHit(), ntupleDataFormat._RecoHitAdaptor.stripHits(), ntupleDataFormat.Event.stripHits(), ntupleDataFormat.TrackMatchInfo.track(), ntupleDataFormat.Seed.track(), ntupleDataFormat.TrackingParticleMatchInfo.trackingParticle(), ntupleDataFormat.SimHit.trackingParticle(), ntupleDataFormat.Event.trackingParticles(), ntupleDataFormat.Event.trackingVertices(), ntupleDataFormat._HitObject.tracks(), ntupleDataFormat.Event.tracks(), ntupleDataFormat.Vertex.tracks(), ntupleDataFormat.TrackingNtuple.tree(), ntupleDataFormat.Track.vertex(), and ntupleDataFormat.Event.vertices().

Exception
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46