CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
output.OutputTree Class Reference
Inheritance diagram for output.OutputTree:
output.FriendOutput output.FullOutput

Public Member Functions

def __init__ (self, tfile, ttree, intree)
 
def branch (self, name, rootBranchType, n=1, lenVar=None, title=None, limitedPrecision=False)
 
def fill (self)
 
def fillBranch (self, name, val)
 
def tree (self)
 
def write (self)
 

Private Attributes

 _branches
 
 _file
 
 _intree
 
 _tree
 

Detailed Description

Definition at line 70 of file output.py.

Constructor & Destructor Documentation

◆ __init__()

def output.OutputTree.__init__ (   self,
  tfile,
  ttree,
  intree 
)

Definition at line 71 of file output.py.

71  def __init__(self, tfile, ttree, intree):
72  self._file = tfile
73  self._tree = ttree
74  self._intree = intree
75  self._branches = {}
76 
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

◆ branch()

def output.OutputTree.branch (   self,
  name,
  rootBranchType,
  n = 1,
  lenVar = None,
  title = None,
  limitedPrecision = False 
)

Definition at line 80 of file output.py.

References output.OutputTree._branches, datamodel.Event._tree, and output.OutputTree._tree.

Referenced by python.cmstools.EventTree.__getattr__().

80  ):
81  # and (not self._tree.GetBranch(lenVar)):
82  if (lenVar != None) and (lenVar not in self._branches):
83  self._branches[lenVar] = OutputBranch(self._tree, lenVar, "i")
84  self._branches[name] = OutputBranch(
85  self._tree, name, rootBranchType, n=n,
86  lenVar=lenVar, title=title, limitedPrecision=limitedPrecision
87  )
88  return self._branches[name]
89 

◆ fill()

def output.OutputTree.fill (   self)

Definition at line 101 of file output.py.

References datamodel.Event._tree, output.OutputTree._tree, and HcalObjRepresent.Fill().

101  def fill(self):
102  self._tree.Fill()
103 
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)

◆ fillBranch()

def output.OutputTree.fillBranch (   self,
  name,
  val 
)

Definition at line 90 of file output.py.

References output.OutputTree._branches, output.OutputTree._intree, and treeReaderArrayTools.setExtraBranch().

90  def fillBranch(self, name, val):
91  br = self._branches[name]
92  if br.lenVar and (br.lenVar in self._branches):
93  self._branches[br.lenVar].buff[0] = len(val)
94  setExtraBranch(self._intree, br.lenVar, len(val))
95  br.fill(val)
96  setExtraBranch(self._intree, name, val)
97 
def setExtraBranch(tree, name, val)

◆ tree()

def output.OutputTree.tree (   self)

◆ write()

def output.OutputTree.write (   self)

Member Data Documentation

◆ _branches

output.OutputTree._branches
private

Definition at line 75 of file output.py.

Referenced by output.OutputTree.branch(), and output.OutputTree.fillBranch().

◆ _file

output.OutputTree._file
private

Definition at line 72 of file output.py.

Referenced by ntupleDataFormat.TrackingNtuple.file(), and output.OutputTree.write().

◆ _intree

output.OutputTree._intree
private

Definition at line 74 of file output.py.

Referenced by output.OutputTree.fillBranch().

◆ _tree

output.OutputTree._tree
private

Definition at line 73 of file output.py.

Referenced by ntupleDataFormat._Object.__getattr__(), ntupleDataFormat.BeamSpot.__getattr__(), ntupleDataFormat._Collection.__getitem__(), python.cmstools.EventTree.__getitem__(), ntupleDataFormat._Collection.__iter__(), python.cmstools.EventTree.__iter__(), 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(), output.OutputTree.branch(), python.cmstools.EventTree.branch(), python.cmstools.EventTree.cppCode(), ntupleDataFormat.TrackingVertex.daughterTrackingParticles(), ntupleDataFormat.TrackingParticle.decayVertices(), ntupleDataFormat._DetIdStrAdaptor.detIdStr(), ntupleDataFormat.Event.event(), ntupleDataFormat.Event.eventId(), output.OutputTree.fill(), output.FullOutput.fill(), 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.Seeds.nSeedsForAlgo(), 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.Seeds.seedForAlgo(), ntupleDataFormat._HitObject.seeds(), ntupleDataFormat.Event.seeds(), ntupleDataFormat.GluedHit.seeds(), ntupleDataFormat.Seeds.seedsForAlgo(), ntupleDataFormat.SimHitMatchInfo.simHit(), ntupleDataFormat.TrackingParticle.simHits(), ntupleDataFormat._Collection.size(), 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(), output.OutputTree.tree(), python.cmstools.EventTree.tree(), ntupleDataFormat.TrackingNtuple.tree(), ntupleDataFormat.Track.vertex(), ntupleDataFormat.Event.vertices(), output.OutputTree.write(), and output.FullOutput.write().