ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaKernel
src
getThinningCache.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
10
11
12
#include "
AthenaKernel/getThinningCache.h
"
13
#include "
AthenaKernel/ExtendedEventContext.h
"
14
#include "
AthenaKernel/ThinningCache.h
"
15
#include "GaudiKernel/ThreadLocalContext.h"
16
#include "GaudiKernel/EventContext.h"
17
18
19
namespace
SG
{
20
21
28
const
SG::ThinningCache
*
getThinningCache
(
const
EventContext& ctx)
29
{
30
if
(ctx.hasExtension()) {
31
return
Atlas::getExtendedEventContext
(ctx).
thinningCache
();
32
}
33
return
nullptr
;
34
}
35
36
41
const
SG::ThinningCache
*
getThinningCache
()
42
{
43
return
getThinningCache
(Gaudi::Hive::currentContext());
44
}
45
46
54
const
SG::ThinningInfo
*
getThinningInfo
(
const
EventContext& ctx,
55
const
std::string& key)
56
{
57
if
(
const
SG::ThinningCache
* cache =
getThinningCache
(ctx)) {
58
return
cache->thinningInfo (key);
59
}
60
return
nullptr
;
61
}
62
63
70
const
SG::ThinningInfo
*
getThinningInfo
(
const
std::string& key)
71
{
72
return
getThinningInfo
(Gaudi::Hive::currentContext(), key);
73
}
74
75
83
const
SG::ThinningDecisionBase
*
getThinningDecision
(
const
EventContext& ctx,
84
const
std::string& key)
85
{
86
if
(
const
SG::ThinningCache
* cache =
getThinningCache
(ctx)) {
87
return
cache->thinning (key);
88
}
89
return
nullptr
;
90
}
91
92
99
const
SG::ThinningDecisionBase
*
getThinningDecision
(
const
std::string& key)
100
{
101
return
getThinningDecision
(Gaudi::Hive::currentContext(), key);
102
}
103
104
112
const
SG::ThinningDecisionBase
*
getThinningDecision
(
const
EventContext& ctx,
113
const
sgkey_t
sgkey)
114
{
115
if
(
const
SG::ThinningCache
* cache =
getThinningCache
(ctx)) {
116
return
cache->thinning (sgkey);
117
}
118
return
nullptr
;
119
}
120
121
128
const
SG::ThinningDecisionBase
*
getThinningDecision
(
const
sgkey_t
sgkey)
129
{
130
return
getThinningDecision
(Gaudi::Hive::currentContext(), sgkey);
131
}
132
133
134
}
// namespace SG
135
ExtendedEventContext.h
ThinningCache.h
Atlas::ExtendedEventContext::thinningCache
const SG::ThinningCache * thinningCache() const
Definition
ExtendedEventContext.h:63
SG::ThinningCache
Cache thinning decisions for converters.
Definition
ThinningCache.h:48
SG::ThinningDecisionBase
Hold thinning decisions for one container.
Definition
ThinningDecisionBase.h:39
SG::ThinningInfo
Hold thinning/slimming information for a given object.
Definition
ThinningInfo.h:40
getThinningCache.h
Helpers to retrieve the current thinning cache from the event context.
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition
ExtendedEventContext.cxx:32
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition
sgkey_t.h:32
SG::getThinningCache
const SG::ThinningCache * getThinningCache()
Retrieve the current thinning cache from the current event context.
Definition
getThinningCache.cxx:41
SG::getThinningDecision
const SG::ThinningDecisionBase * getThinningDecision(const EventContext &ctx, const std::string &key)
Retrieve the current thinning decision for key.
Definition
getThinningCache.cxx:83
SG::getThinningCache
const SG::ThinningCache * getThinningCache(const EventContext &ctx)
Retrieve the current thinning cache from the event context.
Definition
getThinningCache.cxx:28
SG::getThinningInfo
const SG::ThinningInfo * getThinningInfo(const EventContext &ctx, const std::string &key)
Retrieve the current thinning information for key.
Definition
getThinningCache.cxx:54
Generated on
for ATLAS Offline Software by
1.17.0