ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthAllocators
AthAllocators
ArenaHandleBaseAllocT.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: ArenaHandleBaseAllocT.h 470529 2011-11-24 23:54:22Z ssnyder $
8
17
18
19
#ifndef ATLALLOCATORS_ARENAHANDLEBASEALLOCT_H
20
#define ATLALLOCATORS_ARENAHANDLEBASEALLOCT_H
21
22
23
#include "
AthAllocators/ArenaHandleBase.h
"
24
#include "
AthAllocators/ArenaAllocatorCreator.h
"
25
#include "
AthAllocators/ArenaAllocatorRegistry.h
"
26
#include "GaudiKernel/System.h"
27
#include <string>
28
29
30
namespace
SG
{
31
32
51
template
<
typename
ALLOC>
52
class
ArenaHandleBaseAllocT
53
:
public
ArenaHandleBase
54
{
55
public
:
57
typedef
ALLOC
alloc_t
;
58
59
66
ArenaHandleBaseAllocT
(
ArenaHeader
*
header
,
size_t
index
);
67
68
76
ArenaHandleBaseAllocT
(
ArenaHeader
*
header
,
77
const
EventContext& ctx,
78
size_t
index
);
79
80
86
ArenaHandleBaseAllocT
(
ArenaBase
* arena,
size_t
index
);
87
88
92
const
typename
ALLOC::Params&
params
()
const
;
93
94
95
protected
:
99
ALLOC*
allocator
();
100
101
105
const
ALLOC*
allocator
()
const
;
106
107
117
template
<
class
HANDLE,
class
DEFPARAMS>
118
static
119
size_t
makeIndex
(
const
typename
ALLOC::Params*
params
);
120
121
private
:
132
class
Creator
133
:
public
ArenaAllocatorCreator
134
{
135
public
:
138
typedef
139
std::unique_ptr<ArenaAllocatorBase>
makeFunc_t
(
const
typename
ALLOC::Params&);
140
141
151
Creator
(
const
std::string&
name
,
152
makeFunc_t
* makeFunc,
153
const
typename
ALLOC::Params&
params
);
154
155
159
virtual
std::unique_ptr<ArenaAllocatorBase>
create
();
160
161
165
const
std::string&
name
()
const
;
166
167
168
protected
:
170
makeFunc_t
*
m_makeFunc
;
171
173
typename
ALLOC::Params
m_params
;
174
};
175
};
176
177
178
}
// namespace SG
179
180
181
#include "
AthAllocators/ArenaHandleBaseAllocT.icc
"
182
183
184
#endif
// not ATLALLOCATORS_ARENAHANDLEBASEALLOCT_H
ArenaAllocatorCreator.h
Provide an interface for creating an arena Allocator. See Arena.h for an overview of the arena-based ...
ArenaAllocatorRegistry.h
Registry of allocator factories. See Arena.h for an overview of the arena-based memory allocators.
ArenaHandleBaseAllocT.icc
ArenaHandleBase.h
Base class for all Handle classes, containing parts that do not depend on the referenced type....
SG::ArenaAllocatorCreator
Provide an interface for creating an arena Allocator.
Definition
ArenaAllocatorCreator.h:39
SG::ArenaBase
Part of Arena dealing with the list of allocators.
Definition
ArenaBase.h:42
SG::ArenaHandleBaseAllocT::Creator::Creator
Creator(const std::string &name, makeFunc_t *makeFunc, const typename ALLOC::Params ¶ms)
Constructor.
SG::ArenaHandleBaseAllocT::Creator::m_params
ALLOC::Params m_params
Set of parameters to use to create our allocator.
Definition
ArenaHandleBaseAllocT.h:173
SG::ArenaHandleBaseAllocT::Creator::m_makeFunc
makeFunc_t * m_makeFunc
Function that creates an Allocator given a set of parameters.
Definition
ArenaHandleBaseAllocT.h:170
SG::ArenaHandleBaseAllocT::Creator::name
const std::string & name() const
Return the name of the Allocator we create.
SG::ArenaHandleBaseAllocT::Creator::makeFunc_t
std::unique_ptr< ArenaAllocatorBase > makeFunc_t(const typename ALLOC::Params &)
Type for m_makeFunc — a function returning a new Allocator from a parameters structure.
Definition
ArenaHandleBaseAllocT.h:139
SG::ArenaHandleBaseAllocT::Creator::create
virtual std::unique_ptr< ArenaAllocatorBase > create()
Create an allocator instance.
SG::ArenaHandleBaseAllocT::allocator
ALLOC * allocator()
Return our current Allocator.
SG::ArenaHandleBaseAllocT::ArenaHandleBaseAllocT
ArenaHandleBaseAllocT(ArenaHeader *header, const EventContext &ctx, size_t index)
Constructor, passing in an index, for a specific event slot.
SG::ArenaHandleBaseAllocT::params
const ALLOC::Params & params() const
Return our Allocator's parameters.
SG::ArenaHandleBaseAllocT::ArenaHandleBaseAllocT
ArenaHandleBaseAllocT(ArenaHeader *header, size_t index)
Constructor, passing in an index.
SG::ArenaHandleBaseAllocT::ArenaHandleBaseAllocT
ArenaHandleBaseAllocT(ArenaBase *arena, size_t index)
Constructor, passing in an index, for a specific Arena.
SG::ArenaHandleBaseAllocT::alloc_t
ALLOC alloc_t
The Allocator we use.
Definition
ArenaHandleBaseAllocT.h:57
SG::ArenaHandleBaseAllocT::allocator
const ALLOC * allocator() const
Return our current Allocator.
SG::ArenaHandleBaseAllocT::makeIndex
static size_t makeIndex(const typename ALLOC::Params *params)
Find the index for creating an allocator.
SG::ArenaHandleBase::ArenaHandleBase
ArenaHandleBase(ArenaHeader *header, size_t index)
Constructor.
Definition
ArenaHandleBase.cxx:28
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
Generated on
for ATLAS Offline Software by
1.17.0