Skip to content
Snippets Groups Projects

Fix naming logic for output of super cycle

Merged Georg Weiss requested to merge CSSTDUIO-2215 into main
1 file
+ 6
4
Compare changes
  • Side-by-side
  • Inline
@@ -91,7 +91,7 @@ public class SuperCycleServiceImpl implements SuperCycleService {
double aMax = 0.0;
double bMax = 0.0;
double cMax = 0.0;
double x;
double x = 0;
long a = 0;
for (SuperCycleDataRow row : longSuperCycle.getData_rows()) {
@@ -102,7 +102,7 @@ public class SuperCycleServiceImpl implements SuperCycleService {
}
Cycle cycle = cycleOptional.get();
cycleList.add(cycle);
if (cycle.getMagnetronPulseLength() != null && cycle.getMagnetronPulseLength() > aMax) {
if (cycle.getMagnetronPulseLength() != null && cycle.getMagnetronPulseLength() > aMax) {
aMax = cycle.getMagnetronPulseLength();
}
if (cycle.getLebtChopperPulseLength() != null && cycle.getLebtChopperPulseLength() > bMax) {
@@ -111,7 +111,7 @@ public class SuperCycleServiceImpl implements SuperCycleService {
if (cycle.getPulseLength() != null && cycle.getPulseLength() > cMax) {
cMax = cycle.getPulseLength();
}
if(cycle.getEvent("IonMagSt").getValue() > 0){
if (cycle.getEvent("IonMagSt") != null && cycle.getEvent("IonMagSt").getValue() > 0) {
a++;
}
}
@@ -130,7 +130,9 @@ public class SuperCycleServiceImpl implements SuperCycleService {
cMax = Math.round(cMax * 1000.0) / 1000.0;
} else {
throw new SuperCycleServiceException("Cannot find frequency for the provided event IonMagSt. It is not found within the super cycle.");
aMax = 0.0;
bMax = 0.0;
cMax = 0.0;
}
String description = "";
Loading