ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
SGTools
src
CurrentEventStore.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
10
11
12
#include "
SGTools/CurrentEventStore.h
"
13
#include "
AthenaKernel/ExtendedEventContext.h
"
14
#include "GaudiKernel/ThreadLocalContext.h"
15
16
17
namespace
SG
{
18
19
20
thread_local
IProxyDict* CurrentEventStore::m_curStore =
nullptr
;
21
22
27
IProxyDict* CurrentEventStore::setStore (IProxyDict* store)
28
{
29
IProxyDict* oldstore =
m_curStore
;
30
m_curStore
=
store
;
31
return
oldstore;
32
}
33
34
39
void
CurrentEventStore::storeToCtx (
IProxyDict
* store)
40
{
41
EventContext ctx = Gaudi::Hive::currentContext();
42
Atlas::ExtendedEventContext
* ectx =
Atlas::tryGetExtendedEventContext
(ctx);
43
if
(ectx) {
44
ectx->
setProxy
(store);
45
Gaudi::Hive::setCurrentContext (ctx);
46
}
47
}
48
49
50
}
// namespace SG
ExtendedEventContext.h
CurrentEventStore.h
Hold a pointer to the current event store.
Atlas::ExtendedEventContext
Definition
ExtendedEventContext.h:23
Atlas::ExtendedEventContext::setProxy
void setProxy(IProxyDict *proxy)
Definition
ExtendedEventContext.h:33
IProxyDict
A proxy dictionary.
Definition
AthenaKernel/AthenaKernel/IProxyDict.h:47
Atlas::tryGetExtendedEventContext
const ExtendedEventContext * tryGetExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition
ExtendedEventContext.cxx:42
SGTest::store
TestStore store
Definition
TestStore.cxx:23
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::m_curStore
static IProxyDict * m_curStore
The current event store.
Definition
SGTools/SGTools/CurrentEventStore.h:67
Generated on
for ATLAS Offline Software by
1.17.0