CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
python.cmstools.EventBranch Class Reference
Inheritance diagram for python.cmstools.EventBranch:

Public Member Functions

def __call__ (self)
 
def __init__ (self, parent, name)
 
def setIndex (self, index)
 

Private Member Functions

def __readData (self)
 

Private Attributes

 _branch
 
 _buffer
 
 _index
 
 _readData
 

Detailed Description

Definition at line 154 of file cmstools.py.

Constructor & Destructor Documentation

◆ __init__()

def python.cmstools.EventBranch.__init__ (   self,
  parent,
  name 
)

Definition at line 155 of file cmstools.py.

155  def __init__(self,parent,name):
156  self._branch = parent.tree().GetBranch(name)
157  if self._branch == None:
158  raise cmserror("Unknown branch "+name)
159  self._buffer = createBranchBuffer(self._branch)
160  self._index = parent.index()
161  self._readData = False

Member Function Documentation

◆ __call__()

def python.cmstools.EventBranch.__call__ (   self)

Definition at line 170 of file cmstools.py.

170  def __call__(self):
171  if not self._readData:
172  self.__readData()
173  return self._buffer
174 
175 

References python.cmstools.EventBranch.__readData(), PhiMemoryImage._buffer, python.cmstools.EventBranch._buffer, and python.cmstools.EventBranch._readData.

◆ __readData()

def python.cmstools.EventBranch.__readData (   self)
private

Definition at line 165 of file cmstools.py.

165  def __readData(self):
166  self._branch.GetEntry(self._index)
167  self._readData = True
168 

References python.cmstools.EventBranch._branch, SeedingNode< DATA >._index, lhef::H5Handler._index, RPCMuonExtraStruct._index, python.cmstools.EventTree._index, python.cmstools.EventBranch._index, and python.cmstools.EventBranch._readData.

Referenced by python.cmstools.EventBranch.__call__().

◆ setIndex()

def python.cmstools.EventBranch.setIndex (   self,
  index 
)

Definition at line 162 of file cmstools.py.

162  def setIndex(self,index):
163  self._index = index
164  self._readData = False

References SeedingNode< DATA >._index, lhef::H5Handler._index, RPCMuonExtraStruct._index, python.cmstools.EventTree._index, python.cmstools.EventBranch._index, and python.cmstools.EventBranch._readData.

Member Data Documentation

◆ _branch

python.cmstools.EventBranch._branch
private

Definition at line 156 of file cmstools.py.

Referenced by python.cmstools.EventBranch.__readData().

◆ _buffer

python.cmstools.EventBranch._buffer
private

Definition at line 159 of file cmstools.py.

Referenced by python.cmstools.EventBranch.__call__().

◆ _index

python.cmstools.EventBranch._index
private

Definition at line 160 of file cmstools.py.

Referenced by ntupleDataFormat._Object.__getattr__(), python.cmstools.EventBranch.__readData(), ntupleDataFormat.TrackingParticle._nMatchedSeeds(), ntupleDataFormat._SimHitMatchAdaptor._nMatchedSimHits(), ntupleDataFormat._TrackingParticleMatchAdaptor._nMatchedTrackingParticles(), ntupleDataFormat.TrackingParticle._nMatchedTracks(), html.HtmlReport.addNote(), 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(), python.cmstools.EventBranch.setIndex(), ntupleDataFormat.SimHitMatchInfo.simHit(), ntupleDataFormat.TrackingVertex.sourceTrackingParticles(), ntupleDataFormat.GluedHit.stereoHit(), ntupleDataFormat.Seed.track(), ntupleDataFormat.SimHit.trackingParticle(), ntupleDataFormat._HitObject.tracks(), ntupleDataFormat.Vertex.tracks(), ntupleDataFormat.Track.vertex(), and html.HtmlReport.write().

◆ _readData

python.cmstools.EventBranch._readData
private
python.cmstools.createBranchBuffer
def createBranchBuffer(branch)
auto branch types (Chris Jones)
Definition: cmstools.py:54