ATLAS Offline Software
Loading...
Searching...
No Matches
python.pydraw.TreeLoopWrapper Class Reference
Inheritance diagram for python.pydraw.TreeLoopWrapper:
Collaboration diagram for python.pydraw.TreeLoopWrapper:

Public Member Functions

 __init__ (self, tree)
 loop (self, f, looplo=0, loophi=sys.maxsize)

Protected Attributes

 _tree = tree

Detailed Description

Wrapper for TTree, supplying a loop method.

This class wraps a TTree class and provides a loop method
that will work with pydraw.

Definition at line 509 of file pydraw.py.

Constructor & Destructor Documentation

◆ __init__()

python.pydraw.TreeLoopWrapper.__init__ ( self,
tree )
Make a wrapper for a tree.

Definition at line 516 of file pydraw.py.

516 def __init__ (self, tree):
517 """Make a wrapper for a tree."""
518 self._tree = tree
519 return
520

Member Function Documentation

◆ loop()

python.pydraw.TreeLoopWrapper.loop ( self,
f,
looplo = 0,
loophi = sys.maxsize )
Call f(i,tree) on rows [looplo, loophi)

Definition at line 521 of file pydraw.py.

521 def loop (self, f, looplo=0, loophi=sys.maxsize):
522 """Call f(i,tree) on rows [looplo, loophi)"""
523 tree = self._tree
524 loophi = min (loophi, tree.GetEntries())
525 getentry = tree.GetEntry
526 for i in range(looplo, loophi):
527 getentry(i)
528 f(i, tree)
529 return
530
531

Member Data Documentation

◆ _tree

python.pydraw.TreeLoopWrapper._tree = tree
protected

Definition at line 518 of file pydraw.py.


The documentation for this class was generated from the following file: