diff --git a/DDSegmentation/include/DDSegmentation/BitField64.h b/DDSegmentation/include/DDSegmentation/BitField64.h index 42b91c2cb3b9326efb4d15d81731c46bad458d30..cc19a62ab036c592cf53b98f3bcb7bbb2808ab78 100644 --- a/DDSegmentation/include/DDSegmentation/BitField64.h +++ b/DDSegmentation/include/DDSegmentation/BitField64.h @@ -78,6 +78,9 @@ namespace DDSegmentation { */ void setValue(long64 value ) { _value = ( _joined & value ) ; } + /** Operator for setting a new value and accessing the BitField directly */ + BitField64& operator()(long64 val) { setValue( val ) ; return *this ; } + /** Reset - same as setValue(0) - useful if the same encoder is used for many objects. */ void reset() { _value = 0 ; }