ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
D3PDMakerCoreComps
python
ContainedVectorMultiAssociation.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
#
4
# @file D3PDMakerCoreComps/python/ContainedVectorMultiAssociation.py
5
# @author scott snyder <snyder@bnl.gov>
6
# @date Aug, 2009
7
# @brief Helper for setting up an association to a set of contained objects,
8
# represented as vectors.
9
#
10
11
12
from
.D3PDObject
import
D3PDObject
13
from
AthenaConfiguration.ComponentFactory
import
CompFactory
14
15
D3PD = CompFactory.D3PD
16
17
18
def
ContainedVectorMultiAssociation (parent,
19
assoctool,
20
prefix = '',
21
level = 0,
22
blockname = None,
23
nrowName = 'n',
24
**kw):
25
"""Helper for setting up an association to a set of contained objects,
26
represented as vectors.
27
28
parent: The parent D3PDobject or block.
29
assoctool: The class for the (single) association tool.
30
prefix: Prefix to add to the contained variables, if any.
31
level: Level of detail for the block.
32
blockname: Name for the block.
33
nrowName: Name of the variable for the count of objects.
34
Omitted if empty.
35
36
Extra arguments are passed to the association tool.
37
"""
38
if
blockname
is
None
:
39
blockname = assoctool.__name__
40
41
def
maker (name, prefix, object_name, **kw2):
42
assoc = assoctool (name +
'Assoc'
, **kw2)
43
return
D3PD.ContainedVectorMultiAssociationFillerTool \
44
(name,
45
NrowName = nrowName,
46
Prefix = prefix,
47
Associator = assoc)
48
49
obj = D3PDObject (maker, prefix)
50
parent.defineBlock (level, blockname, obj, **kw)
51
return
obj
Generated on
for ATLAS Offline Software by
1.17.0