ATLAS Offline Software
ThinningHandleBase.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_THINNINGHANDLEBASE_H
14 #define STOREGATE_THINNINGHANDLEBASE_H
15 
16 
18 #include "StoreGate/WriteHandle.h"
20 
21 
22 namespace SG {
23 
24 
32 {
33 public:
35 
36 
44  const std::string& sgkey,
45  const EventContext& ctx);
46 
53 
54 
59  void thin (size_t ndx);
60 
61 
67  void keep (size_t ndx);
68 
69 
79  void thin (const std::vector<bool>& v, Op op = Op::Set);
80 
81 
91  void keep (const std::vector<bool>& v, Op op = Op::Set);
92 
93 
103  void thin (const ThinningDecisionBase& other, Op op = Op::Set);
104 
105 
115  void keep (const ThinningDecisionBase& other, Op op = Op::Set);
116 
117 
121  void thinAll();
122 
123 
127  void keepAll();
128 
129 
133  const ThinningDecision& decision() const;
134 
135 
136 private:
139 
141  std::unique_ptr<ThinningDecision> m_decision;
142 };
143 
144 
145 } // namespace SG
146 
147 
148 #endif // not STOREGATE_THINNINGHANDLEBASE_H
SG::ThinningHandleBase::thinAll
void thinAll()
Mark that all elements should be thinned away.
Definition: ThinningHandleBase.cxx:136
common.sgkey
def sgkey(tool)
Definition: common.py:1028
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::ThinningHandleBase::keepAll
void keepAll()
Mark that all elements should be kept (not thinned).
Definition: ThinningHandleBase.cxx:145
SG::ThinningDecisionBase
Hold thinning decisions for one container.
Definition: ThinningDecisionBase.h:39
WriteHandle.h
Handle class for recording to StoreGate.
SG::ThinningHandleBase::keep
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
Definition: ThinningHandleBase.cxx:68
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
ThinningDecision.h
Hold thinning decisions for one container.
SG::ThinningDecisionBase::Op::Set
@ Set
SG::ThinningHandleBase::ThinningHandleBase
ThinningHandleBase(const WriteHandleKey< ThinningDecision > &dkey, const std::string &sgkey, const EventContext &ctx)
Constructor.
Definition: ThinningHandleBase.cxx:27
SG::ThinningDecision
Hold thinning decisions for one container.
Definition: ThinningDecision.h:40
SG::ThinningHandleBase::decision
const ThinningDecision & decision() const
Return the thinning object we're building.
Definition: ThinningHandleBase.cxx:154
SG::ThinningHandleBase
Handle for requesting thinning: factor out type-independent code.
Definition: ThinningHandleBase.h:32
SG::ThinningHandleBase::m_decision
std::unique_ptr< ThinningDecision > m_decision
The thinning object we're building.
Definition: ThinningHandleBase.h:141
SG::ThinningHandleBase::thin
void thin(size_t ndx)
Mark that index ndx in the container should be thinned away.
Definition: ThinningHandleBase.cxx:57
SG::ThinningDecisionBase::Op
Op
Definition: ThinningDecisionBase.h:44
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::ThinningHandleBase::~ThinningHandleBase
~ThinningHandleBase()
Destructor.
Definition: ThinningHandleBase.cxx:41
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
SG::ThinningHandleBase::m_decisionHandle
WriteHandle< ThinningDecision > m_decisionHandle
Handle for writing the decision object.
Definition: ThinningHandleBase.h:138