LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
UTIL::BitFieldValue Class Reference

Helper class for BitField64 that corresponds to one field value. More...

#include <BitField64.h>

Public Member Functions

virtual ~BitFieldValue ()
 
 BitFieldValue (lcio::long64 &bitfield, const std::string &name, unsigned offset, int signedWidth)
 The default c'tor. More...
 
lcio::long64 value () const
 Returns the current field value. More...
 
BitFieldValueoperator= (lcio::long64 in)
 Assignment operator for user convenience. More...
 
 operator lcio::long64 () const
 Conversion operator for lcio::long64 - allows to write:
lcio::long64 index = myBitFieldValue ;. More...
 
const std::stringname () const
 fg: removed because it causes ambiguities with operator lcio::long64(). More...
 
unsigned offset () const
 The field's offset. More...
 
unsigned width () const
 The field's width. More...
 
bool isSigned () const
 True if field is interpreted as signed. More...
 
lcio::ulong64 mask () const
 The field's mask. More...
 

Protected Attributes

lcio::long64_b
 
lcio::ulong64 _mask {0}
 
std::string _name
 
unsigned _offset {0}
 
unsigned _width {0}
 
int _minVal {0}
 
int _maxVal {0}
 
bool _isSigned {false}
 

Detailed Description

Helper class for BitField64 that corresponds to one field value.

Definition at line 55 of file BitField64.h.

Constructor & Destructor Documentation

virtual UTIL::BitFieldValue::~BitFieldValue ( )
inlinevirtual

Definition at line 58 of file BitField64.h.

UTIL::BitFieldValue::BitFieldValue ( lcio::long64 bitfield,
const std::string name,
unsigned  offset,
int  signedWidth 
)

The default c'tor.

Parameters
bitfieldreference to the 64bit bitfield
offsetoffset of field
signedWidthwidth of field, negative if field is signed

Definition at line 11 of file BitField64.cc.

References _isSigned, _mask, _maxVal, _minVal, _name, _offset, _width, and std::stringstream::str().

Member Function Documentation

bool UTIL::BitFieldValue::isSigned ( ) const
inline

True if field is interpreted as signed.

Definition at line 98 of file BitField64.h.

References _isSigned.

lcio::ulong64 UTIL::BitFieldValue::mask ( ) const
inline

The field's mask.

Definition at line 101 of file BitField64.h.

References _mask.

Referenced by UTIL::BitField64::addField().

const std::string& UTIL::BitFieldValue::name ( ) const
inline

fg: removed because it causes ambiguities with operator lcio::long64().

Conversion operator for int - allows to write:
int index = myBitFieldValue ;The field's name

Definition at line 89 of file BitField64.h.

References _name.

unsigned UTIL::BitFieldValue::offset ( ) const
inline

The field's offset.

Definition at line 92 of file BitField64.h.

References _offset.

UTIL::BitFieldValue::operator lcio::long64 ( ) const
inline

Conversion operator for lcio::long64 - allows to write:
lcio::long64 index = myBitFieldValue ;.

Definition at line 80 of file BitField64.h.

References value().

BitFieldValue & UTIL::BitFieldValue::operator= ( lcio::long64  in)

Assignment operator for user convenience.

Definition at line 75 of file BitField64.cc.

References _b, _mask, _maxVal, _name, _offset, _width, and std::stringstream::str().

long64 UTIL::BitFieldValue::value ( ) const

Returns the current field value.

Definition at line 56 of file BitField64.cc.

References _b, _isSigned, _mask, _offset, and _width.

Referenced by operator lcio::long64().

unsigned UTIL::BitFieldValue::width ( ) const
inline

The field's width.

Definition at line 95 of file BitField64.h.

References _width.

Member Data Documentation

lcio::long64& UTIL::BitFieldValue::_b
protected

Definition at line 106 of file BitField64.h.

Referenced by operator=(), and value().

bool UTIL::BitFieldValue::_isSigned {false}
protected

Definition at line 113 of file BitField64.h.

Referenced by BitFieldValue(), isSigned(), and value().

lcio::ulong64 UTIL::BitFieldValue::_mask {0}
protected

Definition at line 107 of file BitField64.h.

Referenced by BitFieldValue(), mask(), operator=(), and value().

int UTIL::BitFieldValue::_maxVal {0}
protected

Definition at line 112 of file BitField64.h.

Referenced by BitFieldValue(), and operator=().

int UTIL::BitFieldValue::_minVal {0}
protected

Definition at line 111 of file BitField64.h.

Referenced by BitFieldValue().

std::string UTIL::BitFieldValue::_name
protected

Definition at line 108 of file BitField64.h.

Referenced by BitFieldValue(), name(), and operator=().

unsigned UTIL::BitFieldValue::_offset {0}
protected

Definition at line 109 of file BitField64.h.

Referenced by BitFieldValue(), offset(), operator=(), and value().

unsigned UTIL::BitFieldValue::_width {0}
protected

Definition at line 110 of file BitField64.h.

Referenced by BitFieldValue(), operator=(), value(), and width().


The documentation for this class was generated from the following files: