run.json descriptions.json Infineon.Mesa.PDF.Text.Stripper 4.8.0.2 WaferMean NestExistingFiles only for TriggerOnCreated txt now writes .a and .b csv file Stratus doesn't work the .csv file MSTEST0037
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System.Collections.ObjectModel;
|
|
|
|
namespace Adaptation.FileHandlers.txt;
|
|
|
|
#nullable enable
|
|
|
|
public class Grade
|
|
{
|
|
|
|
public Grade(string mean, string stdDev)
|
|
{
|
|
Mean = mean;
|
|
StdDev = stdDev;
|
|
}
|
|
|
|
public string Mean { 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.Trim().StartsWith(constant.Cassette) || !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);
|
|
}
|
|
result = mean is null || stdDev is null ? null : new(mean: mean,
|
|
stdDev: stdDev);
|
|
return result;
|
|
}
|
|
|
|
} |