Write input PDSF in output after EOF GetPropertyValue for MoveMatchingFiles ProcessDataStandardFormat over Tuple MoveMatchingFiles to use ProcessDataStandardFormatMapping
48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
using System.Collections.ObjectModel;
|
|
|
|
namespace Adaptation.FileHandlers.Stratus;
|
|
|
|
#nullable enable
|
|
|
|
public class Grade
|
|
{
|
|
|
|
public Grade(string meanThickness, string stdDev)
|
|
{
|
|
MeanThickness = meanThickness;
|
|
StdDev = stdDev;
|
|
}
|
|
|
|
public string MeanThickness { get; }
|
|
public string StdDev { get; }
|
|
|
|
internal static Grade? Get(Constant constant, ReadOnlyCollection<string> groups)
|
|
{
|
|
Grade? result;
|
|
string? mean = null;
|
|
string? stdDev = null;
|
|
int[] j = new int[] { 0 };
|
|
foreach (string groupText in groups)
|
|
{
|
|
if (!groupText.Contains(constant.Finished))
|
|
continue;
|
|
mean = string.Empty;
|
|
stdDev = string.Empty;
|
|
Header.ScanPast(groupText, j, constant.Mean);
|
|
mean = Wafer.GetToken(groupText, j);
|
|
if (mean.EndsWith(","))
|
|
mean = mean.Remove(mean.Length - 1, 1);
|
|
Header.ScanPast(groupText, j, constant.STDD);
|
|
stdDev = Wafer.GetToken(groupText, j);
|
|
if (stdDev.EndsWith(","))
|
|
stdDev = stdDev.Remove(stdDev.Length - 1, 1);
|
|
}
|
|
if (mean is null || stdDev is null)
|
|
result = null;
|
|
else
|
|
result = new(meanThickness: mean,
|
|
stdDev: stdDev);
|
|
return result;
|
|
}
|
|
|
|
} |