CMS 3D CMS Logo

List of all members | Public Member Functions
ntupleDataFormat.Seeds Class Reference
Inheritance diagram for ntupleDataFormat.Seeds:
ntupleDataFormat._Collection

Public Member Functions

def __init__ (self, tree)
 
def nSeedsForAlgo (self, algo)
 
def seedForAlgo (self, algo, iseed)
 
def seedsForAlgo (self, algo)
 
- Public Member Functions inherited from ntupleDataFormat._Collection
def __getitem__ (self, index)
 
def __init__ (self, tree, sizeBranch, objclass)
 
def __iter__ (self)
 
def __len__ (self)
 
def size (self)
 

Detailed Description

Class presenting a collection of seeds.

Definition at line 877 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

def ntupleDataFormat.Seeds.__init__ (   self,
  tree 
)
Constructor.

Arguments:
tree -- TTree object

Definition at line 879 of file ntupleDataFormat.py.

879  def __init__(self, tree):
880  """Constructor.
881 
882  Arguments:
883  tree -- TTree object
884  """
885  super(Seeds, self).__init__(tree, "see_pt", Seed)
886 
def __init__(self, tree)

Member Function Documentation

def ntupleDataFormat.Seeds.nSeedsForAlgo (   self,
  algo 
)
Returns the number of seeds for a given 'algo'.

Definition at line 887 of file ntupleDataFormat.py.

References ntupleDataFormat._seedOffsetForAlgo(), ntupleDataFormat._Collection._tree, and python.cmstools.EventTree._tree.

887  def nSeedsForAlgo(self, algo):
888  """Returns the number of seeds for a given 'algo'."""
889  (offset, next_offset) = _seedOffsetForAlgo(self._tree, algo)
890  return next_offset - offset
891 
def nSeedsForAlgo(self, algo)
def _seedOffsetForAlgo(tree, algo)
def ntupleDataFormat.Seeds.seedForAlgo (   self,
  algo,
  iseed 
)
Returns Seed of index 'iseed' for 'algo'.

Definition at line 901 of file ntupleDataFormat.py.

References ntupleDataFormat._seedOffsetForAlgo(), ntupleDataFormat._Collection._tree, and python.cmstools.EventTree._tree.

901  def seedForAlgo(self, algo, iseed):
902  """Returns Seed of index 'iseed' for 'algo'."""
903  (offset, next_offset) = _seedOffsetForAlgo(self._tree, algo)
904  if iseed >= (next_offset-offset):
905  raise Exception("Seed index %d is larger than the number of seeds %d for algo %d (%s)" % (iseed, next_offset-offset, algo, Algo.toString(algo)))
906  return Seed(self._tree, offset+iseed)
907 
def seedForAlgo(self, algo, iseed)
def _seedOffsetForAlgo(tree, algo)
def ntupleDataFormat.Seeds.seedsForAlgo (   self,
  algo 
)
Returns generator iterating over the seeds of a given 'algo'.

Generator returns Seed object.

Definition at line 892 of file ntupleDataFormat.py.

References ntupleDataFormat._seedOffsetForAlgo(), ntupleDataFormat._Collection._tree, and python.cmstools.EventTree._tree.

892  def seedsForAlgo(self, algo):
893  """Returns generator iterating over the seeds of a given 'algo'.
894 
895  Generator returns Seed object.
896  """
897  (offset, next_offset) = _seedOffsetForAlgo(self._tree, algo)
898  for isee in xrange(offset, next_offset):
899  yield Seed(self._tree, isee)
900 
def seedsForAlgo(self, algo)
def _seedOffsetForAlgo(tree, algo)