ATLAS Offline Software
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$
14 #include "FirstAssociationTool.h"
17 
18 
19 namespace 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 {
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 
81 const std::type_info& FirstAssociationTool::typeinfo() const
82 {
83  return m_associator->elementTypeinfo();
84 
85 }
86 
87 
95 const 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
D3PD::IAddVariable
Common interface for adding a variable to a tuple.
Definition: IAddVariable.h:70
D3PD::FirstAssociationTool::configureD3PD
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
Definition: FirstAssociationTool.cxx:58
D3PD::FirstAssociationTool::m_associator
ToolHandle< IMultiAssociationTool > m_associator
The wrapped multiple association tool.
Definition: FirstAssociationTool.h:108
initialize
void initialize()
Definition: run_EoverP.cxx:894
tree
TChain * tree
Definition: tile_monitor.h:30
D3PD::FirstAssociationTool::initialize
virtual StatusCode initialize() override
Standard Gaudi initialize method.
Definition: FirstAssociationTool.cxx:42
D3PD::FirstAssociationTool::book
virtual StatusCode book() override
Declare tuple variables.
Definition: FirstAssociationTool.cxx:71
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
D3PD::FirstAssociationTool::FirstAssociationTool
FirstAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: FirstAssociationTool.cxx:28
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
D3PD::FirstAssociationTool::releaseObjectUntyped
virtual void releaseObjectUntyped(const void *p) override
Release an object retrieved from the association.
Definition: FirstAssociationTool.cxx:113
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::FirstAssociationTool::typeinfo
virtual const std::type_info & typeinfo() const override
Return the type of object retrieved by this tool.
Definition: FirstAssociationTool.cxx:81
D3PD::FirstAssociationTool::getUntyped
virtual const void * getUntyped(const void *p) override
Return the target object.
Definition: FirstAssociationTool.cxx:95
IMultiAssociationTool.h
Abstract interface to form a multi-way association.
FirstAssociationTool.h