Definition of unsigned integer types with overflow. More...
#include <L1GctUnsignedInt.h>
Public Member Functions | |
L1GctUnsignedInt () | |
Construct an unsigned integer with initial value zero. More... | |
L1GctUnsignedInt (unsigned value) | |
Construct an unsigned integer and check for overFlow. More... | |
template<int mBits> | |
L1GctUnsignedInt (const L1GctUnsignedInt< mBits > &rhs) | |
Copy contructor to move data between representations with different numbers of bits. More... | |
L1GctUnsignedInt | operator+ (const L1GctUnsignedInt &rhs) const |
add two numbers More... | |
L1GctUnsignedInt & | operator= (int value) |
overload = operator More... | |
bool | overFlow () const |
access overflow More... | |
void | reset () |
reset value and overflow to zero More... | |
void | setOverFlow (bool oflow) |
set the overflow bit More... | |
void | setValue (unsigned value) |
Set value from unsigned. More... | |
int | size () const |
return number of bits More... | |
unsigned | value () const |
access value as unsigned More... | |
~L1GctUnsignedInt () | |
Destructor. More... | |
Protected Attributes | |
int | m_nBits |
bool | m_overFlow |
unsigned | m_value |
Static Protected Attributes | |
static const int | MAX_NBITS = 24 |
Definition of unsigned integer types with overflow.
This file defines the template class L1GctUnsignedInt. It is used to store energy values that are represented in a given number of bits in hardware. The type has a built-in overFlow that is set if the value to be represented is outside the allowed range for that number of bits. This type represents unsigned integers; signed integers are represented by L1GctTwosComplement. Functions are defined to add two values, and to copy data into a different number of bits.
this header file contains method definitions because these are template classes see http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12
Definition at line 27 of file L1GctUnsignedInt.h.
L1GctUnsignedInt< nBits >::L1GctUnsignedInt | ( | ) |
Construct an unsigned integer with initial value zero.
Definition at line 84 of file L1GctUnsignedInt.h.
References reset().
L1GctUnsignedInt< nBits >::L1GctUnsignedInt | ( | unsigned | value | ) |
Construct an unsigned integer and check for overFlow.
Definition at line 90 of file L1GctUnsignedInt.h.
References reco::JetExtendedAssociation::setValue().
L1GctUnsignedInt< nBits >::~L1GctUnsignedInt | ( | ) |
L1GctUnsignedInt< nBits >::L1GctUnsignedInt | ( | const L1GctUnsignedInt< mBits > & | rhs | ) |
Copy contructor to move data between representations with different numbers of bits.
Definition at line 103 of file L1GctUnsignedInt.h.
References L1GctUnsignedInt< nBits >::overFlow(), reco::JetExtendedAssociation::setValue(), and L1GctUnsignedInt< nBits >::value().
L1GctUnsignedInt< nBits > L1GctUnsignedInt< nBits >::operator+ | ( | const L1GctUnsignedInt< nBits > & | rhs | ) | const |
add two numbers
Definition at line 123 of file L1GctUnsignedInt.h.
References L1GctUnsignedInt< nBits >::overFlow(), L1GctUnsignedInt< nBits >::setOverFlow(), L1GctUnsignedInt< nBits >::setValue(), groupFilesInBlocks::temp, L1GctUnsignedInt< nBits >::value(), and relativeConstraints::value.
L1GctUnsignedInt< nBits > & L1GctUnsignedInt< nBits >::operator= | ( | int | value | ) |
overload = operator
Definition at line 144 of file L1GctUnsignedInt.h.
References reco::JetExtendedAssociation::setValue().
|
inline |
access overflow
Definition at line 56 of file L1GctUnsignedInt.h.
Referenced by L1GctJetFinderBase::doEtSums(), L1GctJetFinderBase::doHtSums(), L1GctJetFinderBase::etComponentForJetFinder(), L1GctJetCount< nBits >::L1GctJetCount(), L1GctUnsignedInt< nBits >::L1GctUnsignedInt(), L1GctMet::metVector(), L1GctJetCount< nBits >::operator+(), L1GctUnsignedInt< nBits >::operator+(), L1GctWheelEnergyFpga::process(), L1GctGlobalEnergyAlgos::process(), and L1GctJetLeafCard::process().
|
inline |
reset value and overflow to zero
Definition at line 41 of file L1GctUnsignedInt.h.
Referenced by L1GctJetFinderBase::hfTowerSumsType::reset(), L1GctWheelEnergyFpga::resetProcessor(), L1GctJetLeafCard::resetProcessor(), and L1GctGlobalEnergyAlgos::resetProcessor().
|
inline |
set the overflow bit
Definition at line 50 of file L1GctUnsignedInt.h.
Referenced by L1GctJetFinderBase::doEtSums(), L1GctJetFinderBase::doHtSums(), L1GctMet::metVector(), L1GctUnsignedInt< nBits >::operator+(), L1GctGlobalEnergyAlgos::process(), L1GctGlobalEnergyAlgos::setInputWheelEt(), and L1GctGlobalEnergyAlgos::setInputWheelHt().
void L1GctUnsignedInt< nBits >::setValue | ( | unsigned | value | ) |
Set value from unsigned.
Definition at line 111 of file L1GctUnsignedInt.h.
Referenced by L1GctJetFinderBase::doEtSums(), L1GctJetFinderBase::doHtSums(), L1GctMet::metVector(), L1GctUnsignedInt< nBits >::operator+(), L1GctWheelEnergyFpga::process(), L1GctGlobalEnergyAlgos::process(), L1GctJetLeafCard::process(), L1GctGlobalEnergyAlgos::setInputWheelEt(), and L1GctGlobalEnergyAlgos::setInputWheelHt().
|
inline |
return number of bits
Definition at line 59 of file L1GctUnsignedInt.h.
Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().
|
inline |
access value as unsigned
Definition at line 53 of file L1GctUnsignedInt.h.
Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), average.Average::average(), Types.string::configValue(), Types.FileInPath::configValue(), L1GctJetFinderBase::etComponentForJetFinder(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), Types.vstring::insertInto(), L1GctJetCount< nBits >::L1GctJetCount(), L1GctUnsignedInt< nBits >::L1GctUnsignedInt(), L1GctJetCount< nBits >::operator+(), L1GctUnsignedInt< nBits >::operator+(), L1GctGlobalHfSumAlgos::process(), and L1GctGlobalEnergyAlgos::process().
|
protected |
Definition at line 69 of file L1GctUnsignedInt.h.
Referenced by L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits >::size().
|
protected |
|
protected |
Definition at line 72 of file L1GctUnsignedInt.h.
Referenced by L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits >::reset(), and L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits >::value().
|
staticprotected |
Definition at line 77 of file L1GctUnsignedInt.h.