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  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 */
13 #ifndef D3PDMAKERUTILS_COLLECTIONGETTERTOOL_H
14 #define D3PDMAKERUTILS_COLLECTIONGETTERTOOL_H
15 
16 
18 #include "AthLinks/ElementLink.h"
19 #include "AthLinks/DataLink.h"
20 
21 
22 namespace D3PD {
23 
24 
34 template <class CONT>
37 {
38 public:
46 
47 
58  virtual const void* getUntyped (bool allowMissing = false);
59 
60 
64  virtual const std::type_info& typeinfo() const;
65 
66 
72  virtual const std::type_info& elementTypeinfo() const;
73 
74 
82  virtual StatusCode reset (bool allowMissing = false);
83 
84 
90  virtual const void* nextUntyped();
91 
92 
103  virtual size_t sizeHint (bool allowMissing = false);
104 
105 
111  virtual const CONT* get (bool allowMissing = false) = 0;
112 
113 
123  virtual void releaseObject (const CONT* p);
124 
125 
135  virtual void releaseObjectUntyped (const void* p);
136 
137 
138 private:
140  typename CONT::const_iterator m_it;
141 
143  typename CONT::const_iterator m_end;
144 };
145 
146 
147 } // namespace D3PD
148 
149 
151 
152 
153 #endif // not D3PDMAKERUTILS_OBJGETTERTOOL_H
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:140
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:37
CollectionGetterTool.icc
D3PD::CollectionGetterTool::m_end
CONT::const_iterator m_end
The iterator at the end of the container.
Definition: CollectionGetterTool.h:143
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::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.
D3PD::CollectionGetterToolImpl::CollectionGetterToolImpl
CollectionGetterToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: CollectionGetterToolImpl.cxx:28
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.
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