ATLAS Offline Software
Functions | Variables
python.IndexMultiAssociation Namespace Reference

Functions

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

Variables

 D3PD = CompFactory.D3PD
 

Function Documentation

◆ IndexMultiAssociation()

def python.IndexMultiAssociation.IndexMultiAssociation (   parent,
  assoctool,
  target,
  prefix = '',
  level = 0,
  blockname = None,
  allowMissing = False,
  nrowName = 'n',
  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,
        or a list of such labels if multiple targets are desired.
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.
nrowName: Name of the variable for the count of objects.
          Omitted if empty.

Extra arguments are passed to the association tool.

Definition at line 18 of file IndexMultiAssociation.py.

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

Variable Documentation

◆ D3PD

python.IndexMultiAssociation.D3PD = CompFactory.D3PD

Definition at line 15 of file IndexMultiAssociation.py.

python.IndexMultiAssociation.IndexMultiAssociation
def IndexMultiAssociation(parent, assoctool, target, prefix='', level=0, blockname=None, allowMissing=False, nrowName='n', containerIndexName='', **kw)
Definition: IndexMultiAssociation.py:18
D3PD::ContainedVectorMultiAssociationFillerTool
Represent a multiple association by containment inside vectors.
Definition: ContainedVectorMultiAssociationFillerTool.h:61
D3PD::IndexFillerTool
Fill an index of an object within a container.
Definition: IndexFillerTool.h:32