ATLAS Offline Software
CollectionGetterTool.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_COLLECTIONGETTERTOOL_H
17 #define D3PDMAKERUTILS_COLLECTIONGETTERTOOL_H
18 
19 
21 #include "AthLinks/ElementLink.h"
22 #include "AthLinks/DataLink.h"
23 
24 
25 namespace D3PD {
26 
27 
37 template <class CONT>
40 {
41 public:
48  CollectionGetterTool (const std::string& type,
49  const std::string& name,
50  const IInterface* parent);
51 
52 
63  virtual const void* getUntyped (bool allowMissing = false);
64 
65 
69  virtual const std::type_info& typeinfo() const;
70 
71 
77  virtual const std::type_info& elementTypeinfo() const;
78 
79 
87  virtual StatusCode reset (bool allowMissing = false);
88 
89 
95  virtual const void* nextUntyped();
96 
97 
108  virtual size_t sizeHint (bool allowMissing = false);
109 
110 
116  virtual const CONT* get (bool allowMissing = false) = 0;
117 
118 
128  virtual void releaseObject (const CONT* p);
129 
130 
140  virtual void releaseObjectUntyped (const void* p);
141 
142 
143 private:
145  typename CONT::const_iterator m_it;
146 
148  typename CONT::const_iterator m_end;
149 };
150 
151 
152 } // namespace D3PD
153 
154 
156 
157 
158 #endif // not D3PDMAKERUTILS_OBJGETTERTOOL_H
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
D3PD::CollectionGetterTool::sizeHint
virtual size_t sizeHint(bool allowMissing=false)
Return an estimate of the number of elements in the iteration.
D3PD::CollectionGetterTool::m_it
CONT::const_iterator m_it
The current iterator.
Definition: CollectionGetterTool.h:145
D3PD::CollectionGetterTool::CollectionGetterTool
CollectionGetterTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
D3PD::CollectionGetterTool::elementTypeinfo
virtual const std::type_info & elementTypeinfo() const
Return the element type of the collection.
D3PD::CollectionGetterTool
Type-safe wrapper for ICollectionGetterTool.
Definition: CollectionGetterTool.h:40
CollectionGetterTool.icc
D3PD::CollectionGetterTool::m_end
CONT::const_iterator m_end
The iterator at the end of the container.
Definition: CollectionGetterTool.h:148
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::CollectionGetterTool::reset
virtual StatusCode reset(bool allowMissing=false)
Reset the iteration to the start of the collection.
D3PD::CollectionGetterTool::nextUntyped
virtual const void * nextUntyped()
Return a pointer to the next element in the collection.
D3PD::CollectionGetterTool::getUntyped
virtual const void * getUntyped(bool allowMissing=false)
Return the target object.
D3PD::CollectionGetterTool::releaseObject
virtual void releaseObject(const CONT *p)
Release an object retrieved from the getter.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
D3PD::CollectionGetterTool::typeinfo
virtual const std::type_info & typeinfo() const
Return the type of the collection object retrieved by this tool.
D3PD::CollectionGetterTool::releaseObjectUntyped
virtual void releaseObjectUntyped(const void *p)
Release an object retrieved from the getter.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CollectionGetterToolImpl.h
Non-template parts of CollectionGetterTool.
D3PD::CollectionGetterTool::get
virtual const CONT * get(bool allowMissing=false)=0
Return the collection object.
D3PD::CollectionGetterToolImpl
Non-template parts of CollectionGetterTool.
Definition: CollectionGetterToolImpl.h:42