ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaKernel
AthenaKernel
AthenaKernel/AthenaKernel/SlotSpecificObj.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-2026 CERN for the benefit of the ATLAS collaboration.
4
*/
5
12
13
14
#ifndef ATHENAKERNEL_SLOTSPECIFICOBJ_H
15
#define ATHENAKERNEL_SLOTSPECIFICOBJ_H
16
17
18
#include "
CxxUtils/checker_macros.h
"
19
#include "GaudiKernel/ThreadLocalContext.h"
20
#include "GaudiKernel/EventContext.h"
21
#include <vector>
22
#include <string>
23
24
25
namespace
SG
{
26
27
31
size_t
getNSlots
();
32
33
39
void
setNSlotsHiveMgrName
ATLAS_NOT_THREAD_SAFE
(
const
std::string& s);
40
41
45
enum class
InvalidSlot
{
Enabled
,
Disabled
};
46
47
82
template
<
class
T, Inval
id
Slot = Inval
id
Slot::Disabled>
83
class
SlotSpecificObj
84
{
85
public
:
91
SlotSpecificObj
();
92
93
98
explicit
SlotSpecificObj
(
size_t
nslots);
99
100
105
T*
get
(
const
EventContext& ctx);
106
107
113
T*
get
();
114
115
120
const
T*
get
(
const
EventContext& ctx)
const
;
121
122
128
const
T*
get
()
const
;
129
130
136
T&
operator*
();
137
138
144
const
T&
operator*
()
const
;
145
146
152
T*
operator->
();
153
154
160
const
T*
operator->
()
const
;
161
162
163
//**********************************************************************
164
// Allow iterating over slots.
165
// Remember that any needed locking of the payload objects
166
// is the responsibility of the caller.
167
168
typedef
typename
std::vector<T>::iterator
iterator
;
169
typedef
typename
std::vector<T>::const_iterator
const_iterator
;
170
typedef
typename
std::vector<T>::value_type
value_type
;
171
172
176
iterator
begin
();
177
178
182
const_iterator
begin
()
const
;
183
184
188
iterator
end
();
189
190
194
const_iterator
end
()
const
;
195
196
197
private
:
199
std::vector<T>
m_slots
;
200
};
201
202
203
}
// namespace SG
204
205
206
#include "
AthenaKernel/SlotSpecificObj.icc
"
207
208
209
#endif
// not ATHENAKERNEL_SLOTSPECIFICOBJ_H
SlotSpecificObj.icc
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
SG::SlotSpecificObj::iterator
std::vector< T >::iterator iterator
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:168
SG::SlotSpecificObj::get
const T * get(const EventContext &ctx) const
Return pointer to the object for slot given by ctx.
SG::SlotSpecificObj::SlotSpecificObj
SlotSpecificObj()
Constructor.
SG::SlotSpecificObj::get
const T * get() const
Return pointer to the object for the current slot.
SG::SlotSpecificObj::SlotSpecificObj
SlotSpecificObj(size_t nslots)
Constructor, with number of slots specified explicitly.
SG::SlotSpecificObj::operator->
T * operator->()
Dereference the pointer.
SG::SlotSpecificObj::begin
const_iterator begin() const
Const begin iterator.
SG::SlotSpecificObj::const_iterator
std::vector< T >::const_iterator const_iterator
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:169
SG::SlotSpecificObj::get
T * get(const EventContext &ctx)
Return pointer to the object for slot given by ctx.
SG::SlotSpecificObj::operator*
T & operator*()
Dereference the pointer.
SG::SlotSpecificObj::begin
iterator begin()
Begin iterator.
SG::SlotSpecificObj::end
iterator end()
End iterator.
SG::SlotSpecificObj::end
const_iterator end() const
Const end iterator.
SG::SlotSpecificObj::value_type
std::vector< T >::value_type value_type
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:170
SG::SlotSpecificObj::get
T * get()
Return pointer to the object for the current slot.
SG::SlotSpecificObj::m_slots
std::vector< T > m_slots
Set of per-slot objects.
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:199
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::InvalidSlot
InvalidSlot
Support of the invalid EventContext in SlotSpecificObj.
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:45
SG::InvalidSlot::Enabled
@ Enabled
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:45
SG::InvalidSlot::Disabled
@ Disabled
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:45
SG::getNSlots
size_t getNSlots()
Return the number of event slots.
Definition
SlotSpecificObj.cxx:64
Generated on
for ATLAS Offline Software by
1.17.0