ATLAS Offline Software
Loading...
Searching...
No Matches
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*/
11
12
13#ifndef STOREGATE_THINNINGHANDLEBASE_H
14#define STOREGATE_THINNINGHANDLEBASE_H
15
16
20
21
22namespace SG {
23
24
32{
33public:
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
136private:
139
141 std::unique_ptr<ThinningDecision> m_decision;
142};
143
144
145} // namespace SG
146
147
148#endif // not STOREGATE_THINNINGHANDLEBASE_H
Handle class for recording to StoreGate.
Hold thinning decisions for one container.
HandleKey object for adding thinning to an object.
Hold thinning decisions for one container.
Hold thinning decisions for one container.
void thin(size_t ndx)
Mark that index ndx in the container should be thinned away.
ThinningHandleBase(const WriteHandleKey< ThinningDecision > &dkey, const std::string &sgkey, const EventContext &ctx)
Constructor.
void thinAll()
Mark that all elements should be thinned away.
const ThinningDecision & decision() const
Return the thinning object we're building.
void keepAll()
Mark that all elements should be kept (not thinned).
std::unique_ptr< ThinningDecision > m_decision
The thinning object we're building.
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
WriteHandle< ThinningDecision > m_decisionHandle
Handle for writing the decision object.
ThinningDecision::Op Op
Property holding a SG store/key/clid from which a WriteHandle is made.
Forward declaration.