1 #ifndef L1GCTUNSIGNEDINT_H 2 #define L1GCTUNSIGNEDINT_H 4 #include <boost/cstdint.hpp> 62 L1GctUnsignedInt
operator+ (
const L1GctUnsignedInt &rhs)
const;
83 std::ostream& operator<<(std::ostream& s, const L1GctUnsignedInt<nBits>&
data);
121 if (value >= (static_cast<unsigned>(1<<
m_nBits)) ) {
166 std::ostream& operator<<(std::ostream& s, const L1GctUnsignedInt<nBits>&
data) {
168 s <<
"L1GctUnsignedInt value : " <<
data.value();
169 if (
data.overFlow()) {
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