1 #ifndef L1GCTUNSIGNEDINT_H 2 #define L1GCTUNSIGNEDINT_H 42 m_value =
static_cast<unsigned>(0);
62 L1GctUnsignedInt
operator+(
const L1GctUnsignedInt& rhs)
const;
81 std::ostream& operator<<(std::ostream& s, const L1GctUnsignedInt<nBits>&
data);
113 if (value >= (static_cast<unsigned>(1 <<
m_nBits))) {
151 std::ostream& operator<<(std::ostream& s, const L1GctUnsignedInt<nBits>&
data) {
152 s <<
"L1GctUnsignedInt value : " <<
data.value();
153 if (
data.overFlow()) {
154 s <<
" Overflow set! ";
void setOverFlow(bool oflow)
set the overflow bit
Definition of unsigned integer types with overflow.
unsigned value() const
access value as unsigned
static const int MAX_NBITS
~L1GctUnsignedInt()
Destructor.
L1GctUnsignedInt()
Construct an unsigned integer with initial value zero.
int size() const
return number of bits
void reset()
reset value and overflow to zero
L1GctUnsignedInt operator+(const L1GctUnsignedInt &rhs) const
add two numbers
char data[epos_bytes_allocation]
void setValue(unsigned value)
Set value from unsigned.
L1GctUnsignedInt & operator=(int value)
overload = operator
bool overFlow() const
access overflow