Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ThinningHandle.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-2025 CERN for the benefit of the ATLAS collaboration
4 */
13 #ifndef STOREGATE_THINNINGHANDLE_H
14 #define STOREGATE_THINNINGHANDLE_H
15 
16 
19 #include "StoreGate/ReadHandle.h"
20 #include "GaudiKernel/ThreadLocalContext.h"
21 
22 
23 namespace SG {
24 
25 
81 template <class T>
83  : public ReadHandle<T>, public ThinningHandleBase
84 {
85 public:
87 
88 
97  : ThinningHandle (key, Gaudi::Hive::currentContext())
98  {
99  }
100 
101 
114  const EventContext& ctx)
115  : ReadHandle<T> (key, ctx),
116  ThinningHandleBase (key.decisionHandleKey(), key.key(), ctx)
117  {
118  }
119 
120  // Disallow initialization from a temporary Key object.
121  explicit ThinningHandle (SG::ThinningHandleKey<T>&& key) = delete; // Not allowed from a temporary.
123  const EventContext& ctx) = delete; // Not allowed from a temporary.
124 };
125 
126 
134 template <class T>
136 {
137  return ThinningHandle<T> (key);
138 }
139 
140 
152 template <class T>
154  const EventContext& ctx)
155 {
156  return ThinningHandle<T> (key, ctx);
157 }
158 
159 
160 } // namespace SG
161 
162 
163 #endif // not STOREGATE_THINNINGHANDLE_H
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::ThinningHandle::ThinningHandle
ThinningHandle(SG::ThinningHandleKey< T > &&key, const EventContext &ctx)=delete
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition: ThinningHandleKey.h:38
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
SG::ThinningHandle
Handle for requesting thinning for a data object.
Definition: ThinningHandle.h:84
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
SG::ThinningHandle::ThinningHandle
ThinningHandle(const ThinningHandleKey< T > &key)
Constructor from a ThinningHandleKey.
Definition: ThinningHandle.h:96
SG::ThinningHandleBase
Handle for requesting thinning: factor out type-independent code.
Definition: ThinningHandleBase.h:32
SG::ThinningHandle::ThinningHandle
ThinningHandle(SG::ThinningHandleKey< T > &&key)=delete
SG::ThinningDecisionBase::Op
Op
Definition: ThinningDecisionBase.h:44
SG::ThinningHandle::ThinningHandle
ThinningHandle(const ThinningHandleKey< T > &key, const EventContext &ctx)
Constructor from a ThinningHandleKey and an explicit event context.
Definition: ThinningHandle.h:113
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
ReadHandle.h
Handle class for reading from StoreGate.
ThinningHandleBase.h
Handle for requesting thinning: factor out type-independent code.
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37