ATLAS Offline Software
Loading...
Searching...
No Matches
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*/
11
12
13#ifndef D3PDMAKERUTILS_COLLECTIONGETTERTOOL_H
14#define D3PDMAKERUTILS_COLLECTIONGETTERTOOL_H
15
16
18#include "AthLinks/ElementLink.h"
19#include "AthLinks/DataLink.h"
20
21
22namespace D3PD {
23
24
34template <class CONT>
37{
38public:
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
138private:
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
Non-template parts of CollectionGetterTool.
CollectionGetterToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Type-safe wrapper for ICollectionGetterTool.
virtual const void * nextUntyped()
Return a pointer to the next element in the collection.
virtual const void * getUntyped(bool allowMissing=false)
Return the target object.
virtual void releaseObjectUntyped(const void *p)
Release an object retrieved from the getter.
virtual const std::type_info & elementTypeinfo() const
Return the element type of the collection.
CONT::const_iterator m_end
The iterator at the end of the container.
virtual void releaseObject(const CONT *p)
Release an object retrieved from the getter.
virtual StatusCode reset(bool allowMissing=false)
Reset the iteration to the start of the collection.
CONT::const_iterator m_it
The current iterator.
virtual const CONT * get(bool allowMissing=false)=0
Return the collection object.
virtual size_t sizeHint(bool allowMissing=false)
Return an estimate of the number of elements in the iteration.
virtual const std::type_info & typeinfo() const
Return the type of the collection object retrieved by this tool.
CollectionGetterToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Block filler tool for noisy FEB information.