|
@@ -20,9 +20,7 @@ string ClassFlowPostProcessing::GetPreValue()
|
|
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
|
|
{
|
|
{
|
|
|
int AnzahlNachkomma = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
|
int AnzahlNachkomma = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
|
|
- std::stringstream stream;
|
|
|
|
|
- stream << std::fixed << std::setprecision(AnzahlNachkomma) << PreValue;
|
|
|
|
|
- result = stream.str();
|
|
|
|
|
|
|
+ result = RundeOutput(PreValue, AnzahlNachkomma + DecimalShift);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -81,9 +79,7 @@ bool ClassFlowPostProcessing::LoadPreValue(void)
|
|
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
|
|
{
|
|
{
|
|
|
int AnzahlNachkomma = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
|
int AnzahlNachkomma = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
|
|
- std::stringstream stream;
|
|
|
|
|
- stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
|
|
|
- ReturnValue = stream.str();
|
|
|
|
|
|
|
+ ReturnValue = RundeOutput(Value, AnzahlNachkomma + DecimalShift);
|
|
|
ReturnValueNoError = ReturnValue;
|
|
ReturnValueNoError = ReturnValue;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -346,18 +342,13 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|
|
zw = zw + analog;
|
|
zw = zw + analog;
|
|
|
|
|
|
|
|
Value = std::stof(zw);
|
|
Value = std::stof(zw);
|
|
|
-
|
|
|
|
|
- std::stringstream stream;
|
|
|
|
|
- stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
|
|
|
- zwvalue = stream.str();
|
|
|
|
|
|
|
+ zwvalue = RundeOutput(Value, AnzahlNachkomma + DecimalShift);
|
|
|
|
|
|
|
|
if ((!AllowNegativeRates) && (Value < PreValue))
|
|
if ((!AllowNegativeRates) && (Value < PreValue))
|
|
|
{
|
|
{
|
|
|
error = "Negative Rate - Returned old value - read value: " + zwvalue;
|
|
error = "Negative Rate - Returned old value - read value: " + zwvalue;
|
|
|
Value = PreValue;
|
|
Value = PreValue;
|
|
|
- stream.str("");
|
|
|
|
|
- stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
|
|
|
- zwvalue = stream.str();
|
|
|
|
|
|
|
+ zwvalue = RundeOutput(Value, AnzahlNachkomma + DecimalShift);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -365,9 +356,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|
|
{
|
|
{
|
|
|
error = "Rate too high - Returned old value - read value: " + zwvalue;
|
|
error = "Rate too high - Returned old value - read value: " + zwvalue;
|
|
|
Value = PreValue;
|
|
Value = PreValue;
|
|
|
- stream.str("");
|
|
|
|
|
- stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
|
|
|
- zwvalue = stream.str();
|
|
|
|
|
|
|
+ zwvalue = RundeOutput(Value, AnzahlNachkomma + DecimalShift);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -396,6 +385,12 @@ string ClassFlowPostProcessing::getReadoutParam(bool _rawValue, bool _noerror)
|
|
|
return ReturnValue;
|
|
return ReturnValue;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+string ClassFlowPostProcessing::RundeOutput(float _in, int _anzNachkomma){
|
|
|
|
|
+ std::stringstream stream;
|
|
|
|
|
+ stream << std::fixed << std::setprecision(_anzNachkomma) << _in;
|
|
|
|
|
+ return stream.str();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
|
|
|
string ClassFlowPostProcessing::ErsetzteN(string input, int lastvalueanalog = -1)
|
|
string ClassFlowPostProcessing::ErsetzteN(string input, int lastvalueanalog = -1)
|
|
|
{
|
|
{
|