1 #ifndef OVERLAY_DATAOVERLAY_RAWDIGITADDER_HARDSATURATE_CXX 2 #define OVERLAY_DATAOVERLAY_RAWDIGITADDER_HARDSATURATE_CXX 11 _max(
std::numeric_limits<short>::
max()),
20 throw std::runtime_error(
"Error in RawDigitAdder_HardSaturate::SetSaturationPoint : point < 0");
30 throw std::runtime_error(
"Error in RawDigitAdder_HardSaturate::SetScaleInput : scale < 0");
38 d_out = (short)(std::round((
float)d1 *
_scale1)) +
39 (
short)(std::round((
float)d2 *
_scale2));
RawDigitAdder_HardSaturate(bool t=true)
void SetSaturationPoint(short x)
void SetScaleInput(float f, float &_scale)
static int max(int a, int b)
Defintion for a class to add two vectors together, and give an "added" waveform. Takes in a saturatio...
void FixOverflow(short &)
void AddRawDigit(short const &, short const &, short &)