ATLAS Offline Software
Functions | Variables
python.IndexAssociation Namespace Reference

Functions

def IndexAssociation (parent, assoctool, target, prefix='', level=0, blockname=None, allowMissing=False, containerIndexName='', **kw)
 

Variables

 D3PD = CompFactory.D3PD
 

Function Documentation

◆ IndexAssociation()

def python.IndexAssociation.IndexAssociation (   parent,
  assoctool,
  target,
  prefix = '',
  level = 0,
  blockname = None,
  allowMissing = False,
  containerIndexName = '',
**  kw 
)
Helper for setting up an association via an index.

parent: The parent D3PDobject or block.
assoctool: The class for the (single) association tool.
target: The label for the getter within which we look up the index.
prefix: Prefix to add to the contained variables, if any.
level: Level of detail for the block.
blockname: Name for the block.
allowMissing: If true, then it is not considered an error for the
              target getter to fail to find the input objects.

Extra arguments are passed to the association tool.

Definition at line 17 of file IndexAssociation.py.

17 def IndexAssociation (parent,
18  assoctool,
19  target,
20  prefix = '',
21  level = 0,
22  blockname = None,
23  allowMissing = False,
24  containerIndexName = '',
25  **kw):
26 
27  """Helper for setting up an association via an index.
28 
29  parent: The parent D3PDobject or block.
30  assoctool: The class for the (single) association tool.
31  target: The label for the getter within which we look up the index.
32  prefix: Prefix to add to the contained variables, if any.
33  level: Level of detail for the block.
34  blockname: Name for the block.
35  allowMissing: If true, then it is not considered an error for the
36  target getter to fail to find the input objects.
37 
38  Extra arguments are passed to the association tool.
39 """
40 
41  if blockname is None:
42  blockname = assoctool.__name__
43 
44  def maker (name, prefix, object_name, **kw2):
45  this_target = target
46  if 'target' in kw2:
47  this_target = kw2['target']
48  del kw2['target']
49 
50  if this_target == '':
51  this_target = []
52  elif not isinstance(this_target, list):
53  this_target = [ this_target ]
54 
55  assoc = assoctool (name + 'Assoc', **kw2)
57  (name, Prefix = prefix, Associator = assoc, Matched = '')
58  indexer = D3PD.IndexFillerTool \
59  (name + 'Index',
60  Targets = this_target,
61  ContainerIndexName = containerIndexName,
62  AllowMissing = allowMissing)
63  filler.BlockFillers += [indexer]
64  filler += [indexer]
65  return filler
66 
67  obj = D3PDObject (maker, prefix)
68  parent.defineBlock (level, blockname, obj, **kw)
69  return obj

Variable Documentation

◆ D3PD

python.IndexAssociation.D3PD = CompFactory.D3PD

Definition at line 14 of file IndexAssociation.py.

D3PD::ContainedAssociationFillerTool
Represent a single association by containment.
Definition: ContainedAssociationFillerTool.h:54
python.IndexAssociation.IndexAssociation
def IndexAssociation(parent, assoctool, target, prefix='', level=0, blockname=None, allowMissing=False, containerIndexName='', **kw)
Definition: IndexAssociation.py:17
D3PD::IndexFillerTool
Fill an index of an object within a container.
Definition: IndexFillerTool.h:32