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 153 of file cmstools.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 154 of file cmstools.py.

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

Member Function Documentation

◆ __call__()

def python.cmstools.EventBranch.__call__ (   self)

Definition at line 169 of file cmstools.py.

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

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 164 of file cmstools.py.

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

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 161 of file cmstools.py.

161  def setIndex(self,index):
162  self._index = index
163  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 155 of file cmstools.py.

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

◆ _buffer

python.cmstools.EventBranch._buffer
private

Definition at line 158 of file cmstools.py.

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

◆ _index

python.cmstools.EventBranch._index
private

Definition at line 159 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:53