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 920 of file ntupleDataFormat.py.

Constructor & Destructor Documentation

◆ __init__()

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

Arguments:
tree -- TTree object

Definition at line 922 of file ntupleDataFormat.py.

922  def __init__(self, tree):
923  """Constructor.
924 
925  Arguments:
926  tree -- TTree object
927  """
928  super(Seeds, self).__init__(tree, "see_pt", Seed)
929 

Member Function Documentation

◆ nSeedsForAlgo()

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

Definition at line 930 of file ntupleDataFormat.py.

930  def nSeedsForAlgo(self, algo):
931  """Returns the number of seeds for a given 'algo'."""
932  (offset, next_offset) = _seedOffsetForAlgo(self._tree, algo)
933  return next_offset - offset
934 

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

◆ seedForAlgo()

def ntupleDataFormat.Seeds.seedForAlgo (   self,
  algo,
  iseed 
)
Returns Seed of index 'iseed' for 'algo'.

Definition at line 944 of file ntupleDataFormat.py.

944  def seedForAlgo(self, algo, iseed):
945  """Returns Seed of index 'iseed' for 'algo'."""
946  (offset, next_offset) = _seedOffsetForAlgo(self._tree, algo)
947  if iseed >= (next_offset-offset):
948  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)))
949  return Seed(self._tree, offset+iseed)
950 

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

◆ seedsForAlgo()

def ntupleDataFormat.Seeds.seedsForAlgo (   self,
  algo 
)
Returns generator iterating over the seeds of a given 'algo'.

Generator returns Seed object.

Definition at line 935 of file ntupleDataFormat.py.

935  def seedsForAlgo(self, algo):
936  """Returns generator iterating over the seeds of a given 'algo'.
937 
938  Generator returns Seed object.
939  """
940  (offset, next_offset) = _seedOffsetForAlgo(self._tree, algo)
941  for isee in range(offset, next_offset):
942  yield Seed(self._tree, isee)
943 

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

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
ntupleDataFormat._seedOffsetForAlgo
def _seedOffsetForAlgo(tree, algo)
Definition: ntupleDataFormat.py:884
Exception