ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaKernel
AthenaKernel
ExtendedEventContext.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAKERNEL_EXTENDEDEVENTCONTEXT_H
6
#define ATHENAKERNEL_EXTENDEDEVENTCONTEXT_H
7
8
#include "
AthenaKernel/IProxyDict.h
"
9
#include "GaudiKernel/EventIDBase.h"
10
#include "GaudiKernel/EventContext.h"
11
#include "
CxxUtils/checker_macros.h
"
12
13
class
IRoiDescriptor
;
14
namespace
SG
{
15
class
ThinningCache
;
16
}
17
namespace
std
{
namespace
pmr
{
18
class
memory_resource;
19
}}
20
21
namespace
Atlas
{
22
23
class
ExtendedEventContext
{
24
public
:
25
ExtendedEventContext
(){};
26
27
ExtendedEventContext
(
IProxyDict
* p,
28
EventIDBase::number_type
conditionsRun
= EventIDBase::UNDEFNUM,
29
const
IRoiDescriptor
* roi =
nullptr
)
30
:
m_proxy
(p),
m_conditionsRun
(
conditionsRun
),
m_roi
(roi)
31
{}
32
33
void
setProxy
(
IProxyDict
* proxy) {
m_proxy
= proxy; }
34
IProxyDict
* proxy
ATLAS_NOT_CONST_THREAD_SAFE
()
const
{
return
m_proxy
; }
35
36
void
setConditionsRun
(EventIDBase::number_type
conditionsRun
)
37
{
m_conditionsRun
=
conditionsRun
; }
38
EventIDBase::number_type
conditionsRun
()
const
39
{
return
m_conditionsRun
; }
40
51
const
IRoiDescriptor
*
roiDescriptor
()
const
{
return
m_roi
; }
52
53
62
void
setThinningCache
(
const
SG::ThinningCache
* cache) {
m_thinningCache
= cache; }
63
const
SG::ThinningCache
*
thinningCache
()
const
{
return
m_thinningCache
; }
64
65
72
void
setMemResource
(std::pmr::memory_resource* memResource) {
m_memResource
= memResource; }
73
std::pmr::memory_resource* memResource
ATLAS_NOT_CONST_THREAD_SAFE
()
const
{
return
m_memResource
; }
74
75
76
private
:
77
IProxyDict
*
m_proxy
{
nullptr
};
78
EventIDBase::number_type
m_conditionsRun
{EventIDBase::UNDEFNUM};
79
const
IRoiDescriptor
*
m_roi
{
nullptr
};
80
const
SG::ThinningCache
*
m_thinningCache
{
nullptr
};
81
std::pmr::memory_resource*
m_memResource
{
nullptr
};
82
};
83
84
85
//**********************************************************************
86
// Out-of-line routines for setting and getting the event context.
87
// Under some circumstances, the dynamic loader can bind the same
88
// symbol to different addresses in different libraries. Among
89
// other effects, this can cause std::any to malfunction; std::any
90
// is used inside EventContext to hold the extended context.
91
// To try to avoid this, we provide out-of-line functions
92
// to manipulate the extended context.
93
97
bool
hasExtendedEventContext
(
const
EventContext& ctx);
98
99
103
const
ExtendedEventContext&
getExtendedEventContext
(
const
EventContext& ctx);
104
105
110
const
ExtendedEventContext*
tryGetExtendedEventContext
(
const
EventContext& ctx);
111
112
116
ExtendedEventContext&
getExtendedEventContext
(EventContext& ctx);
117
118
123
ExtendedEventContext*
tryGetExtendedEventContext
(EventContext& ctx);
124
125
129
void
setExtendedEventContext
(EventContext& ctx,
130
ExtendedEventContext&& ectx);
131
}
// namespace Atlas
132
133
#endif
134
IProxyDict.h
checker_macros.h
Define macros for attributes used to control the static checker.
Atlas::ExtendedEventContext::ATLAS_NOT_CONST_THREAD_SAFE
IProxyDict *proxy ATLAS_NOT_CONST_THREAD_SAFE() const
Definition
ExtendedEventContext.h:34
Atlas::ExtendedEventContext::setThinningCache
void setThinningCache(const SG::ThinningCache *cache)
Thread-local thinning cache.
Definition
ExtendedEventContext.h:62
Atlas::ExtendedEventContext::setProxy
void setProxy(IProxyDict *proxy)
Definition
ExtendedEventContext.h:33
Atlas::ExtendedEventContext::setMemResource
void setMemResource(std::pmr::memory_resource *memResource)
Memory resource.
Definition
ExtendedEventContext.h:72
Atlas::ExtendedEventContext::m_conditionsRun
EventIDBase::number_type m_conditionsRun
Definition
ExtendedEventContext.h:78
Atlas::ExtendedEventContext::roiDescriptor
const IRoiDescriptor * roiDescriptor() const
Get cached pointer to View's Region of Interest Descriptor or nullptr if not describing a View.
Definition
ExtendedEventContext.h:51
Atlas::ExtendedEventContext::m_thinningCache
const SG::ThinningCache * m_thinningCache
Definition
ExtendedEventContext.h:80
Atlas::ExtendedEventContext::conditionsRun
EventIDBase::number_type conditionsRun() const
Definition
ExtendedEventContext.h:38
Atlas::ExtendedEventContext::ExtendedEventContext
ExtendedEventContext(IProxyDict *p, EventIDBase::number_type conditionsRun=EventIDBase::UNDEFNUM, const IRoiDescriptor *roi=nullptr)
Definition
ExtendedEventContext.h:27
Atlas::ExtendedEventContext::ATLAS_NOT_CONST_THREAD_SAFE
std::pmr::memory_resource *memResource ATLAS_NOT_CONST_THREAD_SAFE() const
Definition
ExtendedEventContext.h:73
Atlas::ExtendedEventContext::thinningCache
const SG::ThinningCache * thinningCache() const
Definition
ExtendedEventContext.h:63
Atlas::ExtendedEventContext::m_memResource
std::pmr::memory_resource * m_memResource
Definition
ExtendedEventContext.h:81
Atlas::ExtendedEventContext::setConditionsRun
void setConditionsRun(EventIDBase::number_type conditionsRun)
Definition
ExtendedEventContext.h:36
Atlas::ExtendedEventContext::m_roi
const IRoiDescriptor * m_roi
Definition
ExtendedEventContext.h:79
Atlas::ExtendedEventContext::m_proxy
IProxyDict * m_proxy
Definition
ExtendedEventContext.h:77
Atlas::ExtendedEventContext::ExtendedEventContext
ExtendedEventContext()
Definition
ExtendedEventContext.h:25
IProxyDict
A proxy dictionary.
Definition
AthenaKernel/AthenaKernel/IProxyDict.h:47
IRoiDescriptor
Describes the API of the Region of Ineterest geometry.
Definition
IRoiDescriptor.h:23
SG::ThinningCache
Cache thinning decisions for converters.
Definition
ThinningCache.h:48
Atlas
Definition
ExtendedEventContext.h:21
Atlas::tryGetExtendedEventContext
const ExtendedEventContext * tryGetExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition
ExtendedEventContext.cxx:42
Atlas::setExtendedEventContext
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
Definition
ExtendedEventContext.cxx:70
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition
ExtendedEventContext.cxx:32
Atlas::hasExtendedEventContext
bool hasExtendedEventContext(const EventContext &ctx)
Test whether a context object has an extended context installed.
Definition
ExtendedEventContext.cxx:23
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
std::pmr
Definition
ExtendedEventContext.h:17
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0