#include <strbitset.h>
Classes | |
class | index_type |
Public Types | |
typedef std::vector< bool > | bit_vector |
typedef unsigned int | size_t |
typedef std::map< std::string, size_t > | str_index_map |
Public Member Functions | |
size_t | any () const |
returns true if any are set More... | |
const bit_vector & | bits () const |
give access to the ordered bits More... | |
void | clear () |
clear the bitset and map More... | |
size_t | count () const |
returns number of bits set More... | |
strbitset & | flip () |
flip method of all bits More... | |
strbitset & | flip (std::string s) |
flip method of one bit More... | |
strbitset & | flip (index_type const &i) |
size_t | none () const |
returns true if none are set More... | |
strbitset & | operator &= (const strbitset &r) |
bitwise and More... | |
operator bool () const | |
! cast to bool More... | |
bool | operator! () const |
! Logical negation of bool() More... | |
bool | operator!= (const strbitset &r) const |
inequality operator More... | |
bool | operator!= (bool b) const |
inequality operator to bool More... | |
bool | operator== (const strbitset &r) const |
equality operator More... | |
bool | operator== (bool b) const |
equality operator to bool More... | |
bit_vector::const_reference | operator[] (const std::string s) const |
access method const More... | |
bit_vector::const_reference | operator[] (index_type const &i) const |
bit_vector::reference | operator[] (const std::string s) |
access method non-const More... | |
bit_vector::reference | operator[] (index_type const &i) |
strbitset & | operator^= (const strbitset &r) |
bitwise xor More... | |
strbitset & | operator|= (const strbitset &r) |
bitwise or More... | |
strbitset | operator~ () |
logical negation More... | |
void | print (std::ostream &out) const |
print method More... | |
void | push_back (std::string s) |
strbitset & | set (bool val=true) |
set method of all bits More... | |
strbitset & | set (std::string s, bool val=true) |
set method of one bit More... | |
strbitset & | set (index_type const &i, bool val=true) |
strbitset () | |
constructor: just clears the bitset and map More... | |
const std::vector< std::string > | strings () const |
give access to the ordered strings More... | |
bool | test (std::string s) const |
test More... | |
bool | test (index_type const &i) const |
Private Member Functions | |
size_t | index (std::string s) const |
std::string const & | index (size_t i) const |
Private Attributes | |
bit_vector | bits_ |
the actual bits, indexed by the index in "map_" More... | |
str_index_map | map_ |
map that holds the string–>index map More... | |
Static Private Attributes | |
static const std::string | dummy_ = std::string("") |
Friends | |
class | index_type |
strbitset | operator & (const strbitset &l, const strbitset &r) |
strbitset | operator^ (const strbitset &l, const strbitset &r) |
strbitset | operator| (const strbitset &l, const strbitset &r) |
Definition at line 23 of file strbitset.h.
typedef std::vector<bool> pat::strbitset::bit_vector |
Definition at line 61 of file strbitset.h.
typedef unsigned int pat::strbitset::size_t |
Definition at line 59 of file strbitset.h.
typedef std::map<std::string, size_t> pat::strbitset::str_index_map |
Definition at line 60 of file strbitset.h.
|
inline |
constructor: just clears the bitset and map
Definition at line 64 of file strbitset.h.
References clear().
|
inline |
returns true if any are set
Definition at line 275 of file strbitset.h.
References bits_, and mps_fire::i.
Referenced by none().
|
inline |
give access to the ordered bits
Definition at line 292 of file strbitset.h.
References bits_.
|
inline |
clear the bitset and map
Definition at line 67 of file strbitset.h.
Referenced by Selector< pat::Electron >::Selector(), and strbitset().
|
inline |
returns number of bits set
Definition at line 265 of file strbitset.h.
References bits_, mps_fire::i, and runTheMatrix::ret.
|
inline |
flip method of all bits
Definition at line 134 of file strbitset.h.
References bits_, and mps_fire::i.
|
inline |
|
inline |
Definition at line 158 of file strbitset.h.
References mps_fire::i.
|
inlineprivate |
workhorse: this gets the index of "bits" that is pointed to by the string "s"
Definition at line 311 of file strbitset.h.
References gather_cfg::cout, f, map_, and alignCSCRings::s.
Referenced by pat::strbitset::index_type::index_type(), operator[](), and pat::strbitset::index_type::str().
|
inlineprivate |
Definition at line 321 of file strbitset.h.
References gather_cfg::cout, dummy_, f, mps_fire::i, and map_.
|
inline |
bitwise and
Definition at line 173 of file strbitset.h.
References gather_cfg::cout, mps_fire::i, dqmiolumiharvest::j, submitPVResolutionJobs::key, map_, alignCSCRings::r, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
! cast to bool
Definition at line 73 of file strbitset.h.
|
inline |
! Logical negation of bool()
Definition at line 85 of file strbitset.h.
References nano_mu_local_reco_cff::bool.
|
inline |
inequality operator
Definition at line 259 of file strbitset.h.
References operator==(), and alignCSCRings::r.
|
inline |
inequality operator to bool
Definition at line 262 of file strbitset.h.
References b, and operator==().
|
inline |
equality operator
Definition at line 230 of file strbitset.h.
References gather_cfg::cout, mps_fire::i, dqmiolumiharvest::j, submitPVResolutionJobs::key, map_, alignCSCRings::r, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by operator!=().
|
inline |
equality operator to bool
Definition at line 250 of file strbitset.h.
References b, bits_, and mps_fire::result.
|
inline |
access method const
Definition at line 110 of file strbitset.h.
References bits_, and index().
|
inline |
Definition at line 115 of file strbitset.h.
References bits_, and mps_fire::i.
|
inline |
access method non-const
Definition at line 118 of file strbitset.h.
References bits_, and index().
|
inline |
Definition at line 123 of file strbitset.h.
References bits_, and mps_fire::i.
bitwise xor
Definition at line 211 of file strbitset.h.
References gather_cfg::cout, mps_fire::i, dqmiolumiharvest::j, submitPVResolutionJobs::key, map_, alignCSCRings::r, and AlCaHLTBitMon_QueryRunRegistry::string.
bitwise or
Definition at line 192 of file strbitset.h.
References gather_cfg::cout, mps_fire::i, dqmiolumiharvest::j, submitPVResolutionJobs::key, map_, alignCSCRings::r, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
logical negation
Definition at line 164 of file strbitset.h.
References mps_fire::i, and runTheMatrix::ret.
|
inline |
print method
Definition at line 101 of file strbitset.h.
References bits_, createfilelist::int, map_, and MillePedeFileConverter_cfg::out.
|
inline |
adds an item that is indexed by the string. this can then be sorted, cut, whatever, and the index mapping is kept
Definition at line 90 of file strbitset.h.
References bits_, gather_cfg::cout, map_, and alignCSCRings::s.
Referenced by Selector< pat::Electron >::push_back().
|
inline |
set method of all bits
Definition at line 126 of file strbitset.h.
References bits_, mps_fire::i, and heppy_batch::val.
Referenced by Selector< pat::Electron >::operator()(), JetIDStudiesSelector::operator()(), VersionedSelector< T >::operator()(), PFJetIDSelectionFunctor::operator()(), and JetIDSelectionFunctor::operator()().
|
inline |
set method of one bit
Definition at line 142 of file strbitset.h.
References alignCSCRings::s, and heppy_batch::val.
|
inline |
|
inline |
give access to the ordered strings
Definition at line 295 of file strbitset.h.
References bits_, mps_fire::end, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and map_.
Referenced by PFJetIDSelectionFunctor::PFJetIDSelectionFunctor().
|
inline |
|
inline |
|
friend |
Definition at line 56 of file strbitset.h.
Definition at line 7 of file strbitset.cc.
Definition at line 19 of file strbitset.cc.
Definition at line 13 of file strbitset.cc.
|
private |
the actual bits, indexed by the index in "map_"
Definition at line 332 of file strbitset.h.
Referenced by any(), bits(), clear(), count(), flip(), operator bool(), operator==(), operator[](), print(), push_back(), set(), and strings().
|
staticprivate |
Definition at line 330 of file strbitset.h.
Referenced by index().
|
private |
map that holds the string–>index map
Definition at line 331 of file strbitset.h.
Referenced by clear(), index(), operator &=(), operator==(), operator^=(), operator|=(), print(), push_back(), and strings().