ATLAS Offline Software
ArenaHandleBase.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: ArenaHandleBase.h 470529 2011-11-24 23:54:22Z ssnyder $
8 
18 #ifndef ATLALLOCATORS_ARENAHANDLEBASE_H
19 #define ATLALLOCATORS_ARENAHANDLEBASE_H
20 
24 #include <cstdlib>
25 
26 
27 namespace SG {
28 
29 
59 {
60 public:
68 
69 
77  ArenaHandleBase (ArenaHeader* header, const EventContext& ctx, size_t index);
78 
79 
85  ArenaHandleBase (ArenaBase* arena, size_t index);
86 
87 
97  void reset();
98 
99 
110  void erase();
111 
112 
131  void reserve (size_t size);
132 
133 
139 
140 
141 protected:
148 
149 
156 
157 
158 private:
161 };
162 
163 
164 } // namespace SG
165 
166 
168 
169 
170 #endif // not ATLALLOCATORS_ARENAHANDLEBASE_H
SG::ArenaHandleBase::baseAllocator
ArenaAllocatorBase * baseAllocator()
Return the current Allocator which we are referencing.
SG::ArenaHandleBase::stats
ArenaAllocatorBase::Stats stats() const
Return the statistics block for this allocator, for the current Arena.
Definition: ArenaHandleBase.cxx:121
header
Definition: hcg.cxx:526
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
index
Definition: index.py:1
SG::ArenaHandleBase::erase
void erase()
Free all allocated elements and release memory back to the system (of this type in the current Arena)...
Definition: ArenaHandleBase.cxx:87
SG::ArenaHandleBase
Base class for all Handle classes, containing parts that do not depend on the referenced type.
Definition: ArenaHandleBase.h:59
SG::ArenaHandleBase::reserve
void reserve(size_t size)
Set the total number of elements cached by the allocator (in the current Arena).
Definition: ArenaHandleBase.cxx:111
SG::ArenaHandleBase::baseAllocator
const ArenaAllocatorBase * baseAllocator() const
Return the current Allocator which we are referencing.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ArenaHeader.h
Proxy for a group of Arenas. See Arena.h for an overview of the arena-based memory allocators.
LockedAllocator.h
A pointer type that holds a lock on an allocator object.
SG::ArenaAllocatorBase::Stats
Statistics for an allocator.
Definition: ArenaAllocatorBase.h:188
SG::ArenaHeader
Proxy for a group of Arenas.
Definition: ArenaHeader.h:54
ArenaHandleBase.icc
ArenaAllocatorBase.h
Common base class for arena allocator classes. See Arena.h for an overview of the arena-based memory ...
SG::ArenaAllocatorBase
Common base class for arena allocator classes.
Definition: ArenaAllocatorBase.h:134
SG::LockedAllocator
A pointer type that holds a lock on an allocator object.
Definition: LockedAllocator.h:40
SG::ArenaBase
Part of Arena dealing with the list of allocators.
Definition: ArenaBase.h:42
SG::ArenaHandleBase::reset
void reset()
Free all allocated elements (of this type in the current Arena).
Definition: ArenaHandleBase.cxx:71
SG::ArenaHandleBase::ArenaHandleBase
ArenaHandleBase(ArenaHeader *header, size_t index)
Constructor.
Definition: ArenaHandleBase.cxx:28
SG::ArenaHandleBase::m_allocator
LockedAllocator m_allocator
The associated allocator object.
Definition: ArenaHandleBase.h:160