ATLAS Offline Software
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-2019 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 
121 
129 template <class T>
131 {
132  return ThinningHandle<T> (key);
133 }
134 
135 
147 template <class T>
149  const EventContext& ctx)
150 {
151  return ThinningHandle<T> (key, ctx);
152 }
153 
154 
155 } // namespace SG
156 
157 
158 #endif // not STOREGATE_THINNINGHANDLE_H
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition: ThinningHandleKey.h:38
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
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:270
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::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