ATLAS Offline Software
Loading...
Searching...
No Matches
FirstAssociationTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id$
12
13
17
18
19namespace D3PD {
20
21
29 const std::string& name,
30 const IInterface* parent)
31 : base_class (type, name, parent),
32 m_associator (this)
33{
34 declareProperty ("Associator", m_associator,
35 "The IMultiAssociationTool instance to wrap.");
36}
37
38
43{
44 CHECK( AthAlgTool::initialize() );
45 CHECK( m_associator.retrieve() );
46 return StatusCode::SUCCESS;
47}
48
49
59 const std::type_info& ti)
60{
61 CHECK( m_associator->configureD3PD (tree, ti) );
62 return StatusCode::SUCCESS;
63}
64
65
72{
73 CHECK( m_associator->book() );
74 return StatusCode::SUCCESS;
75}
76
77
81const std::type_info& FirstAssociationTool::typeinfo() const
82{
83 return m_associator->elementTypeinfo();
84
85}
86
87
95const void* FirstAssociationTool::getUntyped (const void* p)
96{
97 StatusCode sc = m_associator->resetUntyped (p);
98 if (sc.isFailure())
99 return 0;
100 return m_associator->nextUntyped();
101}
102
103
114{
115 m_associator->releaseElementUntyped (p);
116}
117
118
119} // namespace D3PD
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Abstract interface to form a multi-way association.
static Double_t sc
virtual const void * getUntyped(const void *p) override
Return the target object.
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
ToolHandle< IMultiAssociationTool > m_associator
The wrapped multiple association tool.
virtual StatusCode book() override
Declare tuple variables.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
virtual const std::type_info & typeinfo() const override
Return the type of object retrieved by this tool.
virtual void releaseObjectUntyped(const void *p) override
Release an object retrieved from the association.
FirstAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Common interface for adding a variable to a tuple.
Block filler tool for noisy FEB information.
TChain * tree