ATLAS Offline Software
Loading...
Searching...
No Matches
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
15#include "GaudiKernel/ThreadLocalContext.h"
16#include "GaudiKernel/EventContext.h"
17
18
19namespace SG {
20
21
28const SG::ThinningCache* getThinningCache (const EventContext& ctx)
29{
30 if (ctx.hasExtension()) {
32 }
33 return nullptr;
34}
35
36
42{
43 return getThinningCache (Gaudi::Hive::currentContext());
44}
45
46
54const 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
70const SG::ThinningInfo* getThinningInfo (const std::string& key)
71{
72 return getThinningInfo (Gaudi::Hive::currentContext(), key);
73}
74
75
83const 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
99const SG::ThinningDecisionBase* getThinningDecision (const std::string& key)
100{
101 return getThinningDecision (Gaudi::Hive::currentContext(), key);
102}
103
104
112const 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
129{
130 return getThinningDecision (Gaudi::Hive::currentContext(), sgkey);
131}
132
133
134} // namespace SG
135
const SG::ThinningCache * thinningCache() const
Cache thinning decisions for converters.
Hold thinning decisions for one container.
Hold thinning/slimming information for a given object.
Helpers to retrieve the current thinning cache from the event context.
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Forward declaration.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition sgkey_t.h:32
const SG::ThinningCache * getThinningCache()
Retrieve the current thinning cache from the current event context.
const SG::ThinningDecisionBase * getThinningDecision(const EventContext &ctx, const std::string &key)
Retrieve the current thinning decision for key.
const SG::ThinningCache * getThinningCache(const EventContext &ctx)
Retrieve the current thinning cache from the event context.
const SG::ThinningInfo * getThinningInfo(const EventContext &ctx, const std::string &key)
Retrieve the current thinning information for key.