ATLAS Offline Software
SingleAssociationTool.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
16 #ifndef D3PDMAKERUTILS_SINGLEASSOCIATIONTOOL_H
17 #define D3PDMAKERUTILS_SINGLEASSOCIATIONTOOL_H
18 
19 
21 #include "D3PDMakerUtils/Types.h"
22 
23 
24 
25 namespace D3PD {
26 
27 
33 template <typename TO_T>
36 {
37 public:
44  SingleAssociationToolTo (const std::string& type,
45  const std::string& name,
46  const IInterface* parent);
47 
48 
52  virtual const std::type_info& typeinfo() const;
53 
54 
64  virtual void releaseObject (const typename SelectType<TO_T, 0>::type* p);
65 
66 
76  virtual void releaseObjectUntyped (const void* p);
77 };
78 
79 
80 //=========================================================================
81 
82 
130 template <typename FROM_T, typename TO_T = FROM_T>
132  : public SingleAssociationToolTo<TO_T>
133 {
134 public:
141  SingleAssociationTool (const std::string& type,
142  const std::string& name,
143  const IInterface* parent);
144 
145 
153  virtual const void* getUntyped (const void* p);
154 
155 
159  virtual const std::type_info& fromTypeinfo() const;
160 
161 
168  virtual const TO_T* get (const FROM_T& p) = 0;
169 };
170 
171 
172 } // namespace D3PD
173 
174 
177 
178 
179 #endif // not D3PDMAKERUTILS_SINGLEASSOCIATIONTOOL_H
D3PD::SingleAssociationTool::get
virtual const TO_T * get(const FROM_T &p)=0
Return the target object.
D3PD::SingleAssociationTool::fromTypeinfo
virtual const std::type_info & fromTypeinfo() const
Return the std::type_info for the source of the association.
D3PD::SingleAssociationToolTo::typeinfo
virtual const std::type_info & typeinfo() const
Return the type of object retrieved by this tool.
D3PD::SingleAssociationTool
Type-safe wrapper for single associator tools.
Definition: SingleAssociationTool.h:133
D3PD::SingleAssociationTool::getUntyped
virtual const void * getUntyped(const void *p)
Return the target object.
SingleAssociationTool.icc
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Types.h
A simple tuple of multiple types.
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
D3PD::SingleAssociationToolTo::SingleAssociationToolTo
SingleAssociationToolTo(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
D3PD::SingleAssociationToolImpl
Non-template parts of SingleAssociationTool.
Definition: SingleAssociationToolImpl.h:47
D3PD::SelectType::type
T type
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/D3PDMakerUtils/Types.h:73
D3PD::SingleAssociationToolTo::releaseObject
virtual void releaseObject(const typename SelectType< TO_T, 0 >::type *p)
Release an object retrieved from the association.
SingleAssociationToolMulti.h
A specialization of SingleAssociationTool that can accept one of several types.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::SingleAssociationToolTo
Helper for SingleAssociationTool.
Definition: SingleAssociationTool.h:36
SingleAssociationToolImpl.h
Non-template parts of SingleAssociationTool.
D3PD::SingleAssociationToolTo::releaseObjectUntyped
virtual void releaseObjectUntyped(const void *p)
Release an object retrieved from the association.
D3PD::SingleAssociationTool::SingleAssociationTool
SingleAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.