|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHENAKERNEL_THINNINGDECISIONBASE_H
14 #define ATHENAKERNEL_THINNINGDECISIONBASE_H
18 #include "boost/dynamic_bitset.hpp"
42 static const std::size_t
RemovedIdx =
static_cast<std::size_t
>(-1);
101 void thin (
size_t ndx);
109 void keep (
size_t ndx);
199 size_t index (
size_t ndxOrig)
const;
217 #endif // not ATHENAKERNEL_THINNINGDECISIONBASE_H
void resize(const size_t size)
Change the number of elements.
Hold thinning decisions for one container.
std::vector< size_t > m_indexMap
Mapping from original indices to thinned indices.
Interface to allow an object to lock itself when made const in SG.
bool thinned(size_t ndx) const
Return true if element ndx should be thinned.
void keep(size_t ndx)
Mark that index ndx in the container should be kept (not thinned away).
void keepAll()
Mark that all elements should be kept (not thinned).
size_t thinnedSize() const
Return the size of the container being thinned after thinning.
static const std::size_t RemovedIdx
Flag used to show that an index has been thinned away.
struct _Set Set
Represents a set of values.
boost::dynamic_bitset m_mask
Thinning map. Set to 1 for thinned elements.
void buildIndexMap()
Build the index map.
void thin(size_t ndx)
Mark that index ndx in the container should be thinned away.
size_t size() const
Return the total size of the container being thinned.
size_t index(size_t ndxOrig) const
Return the index corresponding to ndxOrig after thinning.
ThinningDecisionBase(size_t sz=0)
Constructor.
void thinAll()
Mark that all elements should be thinned away.