|
LCIO
02.17
|
Convenient helper class for setting single bits in a 32bit-field, such as collection flags or hit types - extends std::bitset<32>. More...
#include <BitSet32.h>
Inheritance diagram for UTIL::BitSet32:Public Member Functions | |
| BitSet32 (int val) | |
| Allow to construct this from an int. More... | |
| BitSet32 & | operator= (int val) |
| Allow assignment from an int. More... | |
| operator int () | |
| Direct conversion to int. More... | |
Public Member Functions inherited from std::bitset< 32 > | |
| T | all (T...args) |
| T | any (T...args) |
| T | bitset (T...args) |
| T | count (T...args) |
| T | flip (T...args) |
| T | none (T...args) |
| T | operator!= (T...args) |
| T | operator&= (T...args) |
| T | operator<< (T...args) |
| T | operator<<= (T...args) |
| T | operator== (T...args) |
| T | operator>> (T...args) |
| T | operator>>= (T...args) |
| T | operator[] (T...args) |
| T | operator^= (T...args) |
| T | operator|= (T...args) |
| T | operator~ (T...args) |
| T | reset (T...args) |
| T | set (T...args) |
| T | size (T...args) |
| T | test (T...args) |
| T | to_string (T...args) |
| T | to_ullong (T...args) |
| T | to_ulong (T...args) |
Convenient helper class for setting single bits in a 32bit-field, such as collection flags or hit types - extends std::bitset<32>.
Use convenient methods make_bitset32(...) to create a bit set with some bits set.
Examples:
// set collection flags : LCCollectionVec* calVec = new LCCollectionVec( LCIO::SIMCALORIMETERHIT ) ; calVec->setFlag( UTIL::make_bitset32( LCIO::CHBIT_LONG, LCIO::CHBIT_STEP ) );
// check TrackerHit type: BitSet32 type( hit->getType() ) ; bool isComposite = type.test( ILDTrkHitTypeBit::COMPOSITE_SPACEPOINT ) ; // test w/ range check // or shorter: if( BitSet32( hit->getType() )[ ILDTrkHitTypeBit::COMPOSITE_SPACEPOINT ] ) {...}
Definition at line 31 of file BitSet32.h.
|
inline |
Allow to construct this from an int.
Definition at line 35 of file BitSet32.h.
|
inline |
Direct conversion to int.
Definition at line 44 of file BitSet32.h.
References std::bitset< 32 >::to_ulong().
|
inline |
Allow assignment from an int.
Definition at line 38 of file BitSet32.h.
1.8.5