ATLAS Offline Software
|
Choose the first result from a multiple association. More...
#include <FirstAssociationTool.h>
Public Member Functions | |
FirstAssociationTool (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard Gaudi tool constructor. More... | |
virtual StatusCode | initialize () override |
Standard Gaudi initialize method. More... | |
virtual StatusCode | configureD3PD (IAddVariable *tree, const std::type_info &ti) override |
Configure during initialization: type-check. More... | |
virtual StatusCode | book () override |
Declare tuple variables. More... | |
virtual const std::type_info & | typeinfo () const override |
Return the type of object retrieved by this tool. More... | |
virtual const void * | getUntyped (const void *p) override |
Return the target object. More... | |
virtual void | releaseObjectUntyped (const void *p) override |
Release an object retrieved from the association. More... | |
Private Attributes | |
ToolHandle< IMultiAssociationTool > | m_associator |
The wrapped multiple association tool. More... | |
Choose the first result from a multiple association.
This wrapper will turn a multiple association tool into a single association tool by only using the first result from the association.
Definition at line 37 of file FirstAssociationTool.h.
D3PD::FirstAssociationTool::FirstAssociationTool | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Standard Gaudi tool constructor.
type | The name of the tool type. |
name | The tool name. |
parent | The tool's Gaudi parent. |
Definition at line 28 of file FirstAssociationTool.cxx.
|
overridevirtual |
Declare tuple variables.
This is called at the start of the first event.
Definition at line 71 of file FirstAssociationTool.cxx.
|
overridevirtual |
Configure during initialization: type-check.
tree | Our parent for tuple making. |
ti | Gives the type of the object being passed to resetUntyped . |
configureD3PD
should check that the type of the object coming as input is compatible with what it expects, and raise an error otherwise.
Definition at line 58 of file FirstAssociationTool.cxx.
Return the target object.
p | The source object for the association. |
Return the target of the association, or 0. Should be of the type given by typeinfo
.
Definition at line 95 of file FirstAssociationTool.cxx.
|
overridevirtual |
|
overridevirtual |
Release an object retrieved from the association.
p | The object to release. |
Call this when you are done with the object returned by getUntyped()
. The default implementation is a no-op, but if the association dynamically allocated the object which it returned, this gives it a chance to free it.
Definition at line 113 of file FirstAssociationTool.cxx.
|
overridevirtual |
Return the type of object retrieved by this tool.
Definition at line 81 of file FirstAssociationTool.cxx.
|
private |
The wrapped multiple association tool.
Definition at line 108 of file FirstAssociationTool.h.