ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthAllocators
AthAllocators
ArenaCachingHandle.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-2019 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// $Id: ArenaCachingHandle.h 470529 2011-11-24 23:54:22Z ssnyder $
8
16
17
18
#ifndef ATLALLOCATORS_ARENACACHINGHANDLE_H
19
#define ATLALLOCATORS_ARENACACHINGHANDLE_H
20
21
22
#include "
AthAllocators/ArenaHandleBaseT.h
"
23
#include "
AthAllocators/Arena.h
"
24
25
26
namespace
SG
{
27
28
75
template
<
class
T,
class
ALLOC>
76
class
ArenaCachingHandle
77
:
public
ArenaHandleBaseT
<T, ALLOC>
78
{
79
public
:
81
typedef
ArenaHandleBaseT<T, ALLOC>
Base
;
82
84
typedef
T*
pointer
;
85
88
typedef
typename
Base::iterator
iterator
;
89
typedef
typename
Base::const_iterator
const_iterator
;
90
91
98
ArenaCachingHandle
(
ArenaHeader
*
header
,
size_t
index
);
99
100
102
typedef
typename
ALLOC::template
initParams<T, false>
defaultParams_t
;
103
104
110
ArenaCachingHandle
(
const
typename
ALLOC::Params*
params
=
nullptr
);
111
112
113
121
ArenaCachingHandle
(
ArenaHeader
*
header
,
122
const
typename
ALLOC::Params*
params
=
nullptr
);
123
124
133
ArenaCachingHandle
(
ArenaHeader
*
header
,
134
const
EventContext& ctx,
135
const
typename
ALLOC::Params*
params
=
nullptr
);
136
137
144
ArenaCachingHandle
(
Arena
* arena,
const
typename
ALLOC::Params*
params
=
nullptr
);
145
146
152
pointer
allocate
();
153
154
159
static
160
std::unique_ptr<ArenaAllocatorBase>
161
makeAllocator
(
const
typename
ALLOC::Params&
params
);
162
163
164
// The following methods are inherited:
165
// const ALLOC::Params& params() const;
166
// void reset();
167
// void erase();
168
// void reserve(size_t);
169
// const ArenaAllocatorBase::Stats& stats() const;
170
//
171
// The following inherited functions may be instantiated only
172
// if the Allocator supports them:
173
// iterator begin();
174
// const_iterator begin() const;
175
// iterator end();
176
// const_iterator end() const;
177
// void free (pointer p) const;
178
// void resetTo (pointer p) const;
179
};
180
181
182
}
// namespace SG
183
184
185
186
#include "
AthAllocators/ArenaCachingHandle.icc
"
187
188
189
190
#endif
// not ATLALLOCATORS_ARENACACHINGHANDLE_H
ArenaCachingHandle.icc
ArenaHandleBaseT.h
Base class for Handle classes, containing parts that are independent of how the Allocator gets create...
Arena.h
Collection of memory allocators with a common lifetime, plus subsystem summary.
Arena
Definition
Arena.h:238
SG::ArenaCachingHandle::allocate
pointer allocate()
Allocate a new element.
SG::ArenaCachingHandle::iterator
Base::iterator iterator
Iterators over elements.
Definition
ArenaCachingHandle.h:88
SG::ArenaCachingHandle::ArenaCachingHandle
ArenaCachingHandle(ArenaHeader *header, size_t index)
Constructor, passing in an index.
SG::ArenaCachingHandle::ArenaCachingHandle
ArenaCachingHandle(ArenaHeader *header, const typename ALLOC::Params *params=nullptr)
Constructor, passing in a Header and an optional parameter set.
SG::ArenaCachingHandle::Base
ArenaHandleBaseT< T, ALLOC > Base
Shorthand for our base class.
Definition
ArenaCachingHandle.h:81
SG::ArenaCachingHandle::ArenaCachingHandle
ArenaCachingHandle(Arena *arena, const typename ALLOC::Params *params=nullptr)
Constructor, passing in an Arena and an optional parameter set.
SG::ArenaCachingHandle::ArenaCachingHandle
ArenaCachingHandle(ArenaHeader *header, const EventContext &ctx, const typename ALLOC::Params *params=nullptr)
Constructor, passing in a Header, context, and an optional parameter set.
SG::ArenaCachingHandle::defaultParams_t
ALLOC::template initParams< T, false > defaultParams_t
The class that initializes the default parameter set.
Definition
ArenaCachingHandle.h:102
SG::ArenaCachingHandle::const_iterator
Base::const_iterator const_iterator
Definition
ArenaCachingHandle.h:89
SG::ArenaCachingHandle::makeAllocator
static std::unique_ptr< ArenaAllocatorBase > makeAllocator(const typename ALLOC::Params ¶ms)
Internal helper: create a new Allocator instance.
SG::ArenaCachingHandle::pointer
T * pointer
Pointer to an element.
Definition
ArenaCachingHandle.h:84
SG::ArenaCachingHandle::ArenaCachingHandle
ArenaCachingHandle(const typename ALLOC::Params *params=nullptr)
Constructor, passing in an optional parameter set.
SG::ArenaCachingHandle< VALUE, alloc_t >::params
const alloc_t::Params & params() const
SG::ArenaHandleBaseT::const_iterator
Const iterator.
Definition
ArenaHandleBaseT.h:144
SG::ArenaHandleBaseT::iterator
Non-const iterator.
Definition
ArenaHandleBaseT.h:100
SG::ArenaHandleBaseT::ArenaHandleBaseT
ArenaHandleBaseT(ArenaHeader *header, size_t index)
Constructor, passing in an index.
SG::ArenaHeader
Proxy for a group of Arenas.
Definition
ArenaHeader.h:54
header
Definition
hcg.cxx:529
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
index
Definition
index.py:1
SG::initParams
Heap-based allocator.
Definition
ArenaHeapAllocator.h:88
Generated on
for ATLAS Offline Software by
1.17.0