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 45 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

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

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

Definition at line 53 of file ntupleDataFormat.py.

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

Member Function Documentation

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

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

Definition at line 66 of file ntupleDataFormat.py.

References ntupleDataFormat._Object._checkIsValid(), SeedingNode< DATA >._index, Vispa.Share.FindAlgorithm.FindAlgorithm._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.

66  def __getattr__(self, attr):
67  """Return object member variable.
68 
69  'attr' is translated as a branch in the TTree (<prefix>_<attr>).
70  """
71  self._checkIsValid()
72  val = getattr(self._tree, self._prefix+"_"+attr)[self._index]
73  return lambda: val
74 
def __getattr__(self, attr)
def ntupleDataFormat._Object._checkIsValid (   self)
private
Raise an exception if the object index is not valid.

Definition at line 75 of file ntupleDataFormat.py.

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

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

Member Data Documentation

ntupleDataFormat._Object._index
private

Definition at line 63 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().

ntupleDataFormat._Object._prefix
private

Definition at line 64 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().

ntupleDataFormat._Object._tree
private

Definition at line 62 of file ntupleDataFormat.py.

Referenced by ntupleDataFormat._Object.__getattr__(), ntupleDataFormat.BeamSpot.__getattr__(), ntupleDataFormat.TrackingNtuple.__iter__(), ntupleDataFormat._SimHitMatchAdaptor._nMatchedSimHits(), ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles(), ntupleDataFormat.Event.beamspot(), ntupleDataFormat.TrackingParticle.bestMatchingTrack(), ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticle(), ntupleDataFormat._TrackingParticleMatchAdaptor.bestMatchingTrackingParticleFromFirstHit(), ntupleDataFormat.TrackingVertex.daughterTrackingParticles(), ntupleDataFormat.TrackingParticle.decayVertices(), ntupleDataFormat._DetIdStrAdaptor.detIdStr(), 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.TrackingParticle.matchedSeedInfos(), ntupleDataFormat._SimHitMatchAdaptor.matchedSimHitInfos(), ntupleDataFormat.TrackingParticle.matchedTrackInfos(), ntupleDataFormat._TrackingParticleMatchAdaptor.matchedTrackingParticleInfos(), ntupleDataFormat.GluedHit.monoHit(), ntupleDataFormat._HitObject.nseeds(), ntupleDataFormat._HitObject.ntracks(), ntupleDataFormat.TrackingParticle.parentVertex(), ntupleDataFormat._RecoHitAdaptor.phase2OTHits(), ntupleDataFormat.Event.phase2OTHits(), ntupleDataFormat._RecoHitAdaptor.pixelHits(), ntupleDataFormat.Event.pixelHits(), 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().