ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthAllocators
AthAllocators
ArenaHandle.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: ArenaHandle.h 470529 2011-11-24 23:54:22Z ssnyder $
8
16
17
18
#ifndef ATLALLOCATORS_ARENAHANDLE_H
19
#define ATLALLOCATORS_ARENAHANDLE_H
20
21
22
#include "
AthAllocators/ArenaHandleBaseT.h
"
23
#include "
AthAllocators/Arena.h
"
24
25
26
namespace
SG
{
27
28
70
template
<
class
T,
class
ALLOC>
71
class
ArenaHandle
72
:
public
ArenaHandleBaseT
<T, ALLOC>
73
{
74
public
:
76
typedef
ArenaHandleBaseT<T, ALLOC>
Base
;
77
79
typedef
typename
Base::pointer
pointer
;
80
83
typedef
typename
Base::iterator
iterator
;
84
typedef
typename
Base::const_iterator
const_iterator
;
85
86
93
ArenaHandle
(
ArenaHeader
*
header
,
size_t
index
);
94
95
97
typedef
typename
ALLOC::template
initParams<T, false, true>
defaultParams_t
;
98
99
105
ArenaHandle
(
const
typename
ALLOC::Params*
params
=
nullptr
);
106
107
115
ArenaHandle
(
ArenaHeader
*
header
,
116
const
typename
ALLOC::Params*
params
=
nullptr
);
117
118
127
ArenaHandle
(
ArenaHeader
*
header
,
128
const
EventContext& ctx,
129
const
typename
ALLOC::Params*
params
=
nullptr
);
130
131
138
ArenaHandle
(
Arena
* arena,
const
typename
ALLOC::Params*
params
=
nullptr
);
139
140
147
void
*
allocate
();
148
149
154
static
155
std::unique_ptr<ArenaAllocatorBase>
156
makeAllocator
(
const
typename
ALLOC::Params&
params
);
157
158
159
// The following methods are inherited:
160
// const ALLOC::Params& params() const;
161
// void reset();
162
// void erase();
163
// void reserve(size_t);
164
// const ArenaAllocatorBase::Stats& stats() const;
165
//
166
// The following inherited functions may be instantiated only
167
// if the Allocator supports them:
168
// iterator begin();
169
// const_iterator begin() const;
170
// iterator end();
171
// const_iterator end() const;
172
// void free (pointer p) const;
173
// void resetTo (pointer p) const;
174
};
175
176
177
}
// namespace SG
178
179
180
#include "
AthAllocators/ArenaHandle.icc
"
181
182
183
#endif
// not ATLALLOCATORS_ARENAHANDLE_H
ArenaHandleBaseT.h
Base class for Handle classes, containing parts that are independent of how the Allocator gets create...
ArenaHandle.icc
Arena.h
Collection of memory allocators with a common lifetime, plus subsystem summary.
Arena
Definition
Arena.h:238
SG::ArenaHandleBaseAllocT::params
const ALLOC::Params & params() const
Return our Allocator's parameters.
SG::ArenaHandleBaseT::const_iterator
Const iterator.
Definition
ArenaHandleBaseT.h:144
SG::ArenaHandleBaseT::iterator
Non-const iterator.
Definition
ArenaHandleBaseT.h:100
SG::ArenaHandleBaseT::pointer
T * pointer
A pointer to the element type we're allocating.
Definition
ArenaHandleBaseT.h:42
SG::ArenaHandleBaseT::ArenaHandleBaseT
ArenaHandleBaseT(ArenaHeader *header, size_t index)
Constructor, passing in an index.
SG::ArenaHandle::const_iterator
Base::const_iterator const_iterator
Definition
ArenaHandle.h:84
SG::ArenaHandle::allocate
void * allocate()
Allocate a new element.
SG::ArenaHandle::ArenaHandle
ArenaHandle(ArenaHeader *header, const typename ALLOC::Params *params=nullptr)
Constructor, passing in a Header and an optional parameter set.
SG::ArenaHandle::ArenaHandle
ArenaHandle(ArenaHeader *header, size_t index)
Constructor, passing in an index.
SG::ArenaHandle::ArenaHandle
ArenaHandle(ArenaHeader *header, const EventContext &ctx, const typename ALLOC::Params *params=nullptr)
Constructor, passing in a Header, context, and an optional parameter set.
SG::ArenaHandle::ArenaHandle
ArenaHandle(Arena *arena, const typename ALLOC::Params *params=nullptr)
Constructor, passing in an Arena and an optional parameter set.
SG::ArenaHandle::Base
ArenaHandleBaseT< T, ALLOC > Base
Shorthand for our base class.
Definition
ArenaHandle.h:76
SG::ArenaHandle::iterator
Base::iterator iterator
Iterators over elements.
Definition
ArenaHandle.h:83
SG::ArenaHandle::defaultParams_t
ALLOC::template initParams< T, false, true > defaultParams_t
The class that initializes the default parameter set.
Definition
ArenaHandle.h:97
SG::ArenaHandle::makeAllocator
static std::unique_ptr< ArenaAllocatorBase > makeAllocator(const typename ALLOC::Params ¶ms)
Internal helper: create a new Allocator instance.
SG::ArenaHandle::ArenaHandle
ArenaHandle(const typename ALLOC::Params *params=nullptr)
Constructor, passing in an optional parameter set.
SG::ArenaHandle::pointer
Base::pointer pointer
Pointer to an element.
Definition
ArenaHandle.h:79
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