![]() |
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. | |
| virtual StatusCode | initialize () override |
Standard Gaudi initialize method. | |
| virtual StatusCode | configureD3PD (IAddVariable *tree, const std::type_info &ti) override |
| Configure during initialization: type-check. | |
| virtual StatusCode | book () override |
| Declare tuple variables. | |
| virtual const std::type_info & | typeinfo () const override |
| Return the type of object retrieved by this tool. | |
| virtual const void * | getUntyped (const void *p) override |
| Return the target object. | |
| virtual void | releaseObjectUntyped (const void *p) override |
| Release an object retrieved from the association. | |
Private Attributes | |
| ToolHandle< IMultiAssociationTool > | m_associator |
| The wrapped multiple association tool. | |
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.
|
overridevirtual |
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 |
Standard Gaudi initialize method.
Definition at line 42 of file FirstAssociationTool.cxx.
|
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.