A compact container for storing single bits. More...
#include <BitSet.h>
Classes | |
class | Iterator |
Iterates over all set bits of a BitSet. More... | |
class | Manipulator |
Opaque structure for transparent write access to individual bits. More... | |
Public Types | |
typedef std::size_t | size_t |
Public Member Functions | |
size_t | bits () const |
returns the number of set bits in the container More... | |
BitSet () | |
BitSet (const BitSet &orig) | |
BitSet (size_t bits) | |
construct BitSet with a fixed size of bits bits More... | |
Iterator | iter () const |
create iterator over all set bits More... | |
BitSet & | operator= (const BitSet &orig) |
Manipulator | operator[] (size_t bit) |
provide read/write access to bit with index bit via reference More... | |
const Manipulator | operator[] (size_t bit) const |
provide read access to bit with index bit via reference More... | |
size_t | size () const |
returns the number of all bits in the container More... | |
~BitSet () | |
Protected Types | |
typedef unsigned int | Word_t |
Static Private Member Functions | |
static size_t | bitsToWords (std::size_t bits) |
Private Attributes | |
size_t | bits_ |
Word_t * | store |
Static Private Attributes | |
static const unsigned int | wordSize = sizeof(Word_t) * 8 |
A compact container for storing single bits.
BitSet provides a container of boolean values, similar to a std::vector<bool> which only consumes one actual bit for each value. Also an iterator is provided that can iterate over all set bits.
typedef std::size_t PhysicsTools::BitSet::size_t |
|
protected |
|
inline |
Definition at line 131 of file BitSet.h.
References bits_, bitsToWords(), and store.
|
inline |
construct BitSet with a fixed size of bits bits
Definition at line 141 of file BitSet.h.
References bits(), bitsToWords(), and store.
BitSet::size_t PhysicsTools::BitSet::bits | ( | ) | const |
returns the number of set bits in the container
Definition at line 6 of file BitSet.cc.
References bits_, bitsToWords(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), AlCaHLTBitMon_ParallelJobs::p, and store.
Referenced by BitSet(), and bitsToWords().
|
inlinestaticprivate |
Definition at line 182 of file BitSet.h.
References bits(), and wordSize.
Referenced by bits(), BitSet(), iter(), and operator=().
|
inline |
create iterator over all set bits
Definition at line 179 of file BitSet.h.
References bits_, bitsToWords(), and store.
Referenced by PhysicsTools::VarProcessor::configure(), PhysicsTools::VarProcessor::deriv(), and PhysicsTools::VarProcessor::eval().
Definition at line 152 of file BitSet.h.
References bits_, bitsToWords(), and store.
|
inline |
provide read/write access to bit with index bit via reference
Definition at line 165 of file BitSet.h.
References triggerObjects_cff::bit, store, and wordSize.
|
inline |
provide read access to bit with index bit via reference
Definition at line 168 of file BitSet.h.
References triggerObjects_cff::bit, store, and wordSize.
|
inline |
returns the number of all bits in the container
Definition at line 173 of file BitSet.h.
References bits_.
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), PhysicsTools::VarProcessor::configure(), and PhysicsTools::Calibration::convert().
|
private |
|
private |
Definition at line 186 of file BitSet.h.
Referenced by bits(), BitSet(), iter(), operator=(), operator[](), and ~BitSet().
|
staticprivate |
Definition at line 184 of file BitSet.h.
Referenced by bitsToWords(), PhysicsTools::BitSet::Iterator::operator()(), PhysicsTools::BitSet::Iterator::operator++(), and operator[]().