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 46 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

Definition at line 54 of file ntupleDataFormat.py.

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

◆ __getattr__()

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

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

Definition at line 67 of file ntupleDataFormat.py.

References ntupleDataFormat._Object._checkIsValid(), SeedingNode< DATA >._index, lhef::H5Handler._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.

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

◆ _checkIsValid()

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

Definition at line 76 of file ntupleDataFormat.py.

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

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

◆ index()

def ntupleDataFormat._Object.index (   self)

◆ isValid()

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

Definition at line 81 of file ntupleDataFormat.py.

References SeedingNode< DATA >._index, lhef::H5Handler._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().

81  def isValid(self):
82  """Check if object index is valid."""
83  return self._index != -1
84 
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)

Member Data Documentation

◆ _index

ntupleDataFormat._Object._index
private

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