Bug fix for zero WaferMeanThickness and
RadialVariationThickness
This commit is contained in:
parent
60892383bf
commit
066d9433c1
@ -131,7 +131,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Append(x.Zone).Append(del).
|
Append(x.Zone).Append(del).
|
||||||
Append(x.Cassette).Append(del).
|
Append(x.Cassette).Append(del).
|
||||||
Append(x.Wafer).Append(del).
|
Append(x.Wafer).Append(del).
|
||||||
Append(x.RVThickness);
|
Append(x.RVThickness).Append(del).
|
||||||
|
Append(x.Slot).Append(del).
|
||||||
|
Append(x.MeanThickness);
|
||||||
return results.ToString();
|
return results.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,4 +25,4 @@ public class Body
|
|||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
// Radial variation (computation B) PASS:
|
||||||
|
|
||||||
// thickness -2.7474
|
// thickness -2.7474
|
@ -21,4 +21,4 @@ public class Footer
|
|||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
// Radial variation (computation B) PASS:
|
||||||
|
|
||||||
// thickness -2.7474
|
// thickness -2.7474
|
@ -26,4 +26,4 @@ public class Header
|
|||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
// Radial variation (computation B) PASS:
|
||||||
|
|
||||||
// thickness -2.7474
|
// thickness -2.7474
|
@ -67,7 +67,7 @@ public partial class ProcessData : IProcessData
|
|||||||
_Log = LogManager.GetLogger(typeof(ProcessData));
|
_Log = LogManager.GetLogger(typeof(ProcessData));
|
||||||
TXT txt = Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad);
|
TXT txt = Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad);
|
||||||
if (txt is not null)
|
if (txt is not null)
|
||||||
SetValues(fileRead, logistics, fileInfoCollection, originalDataBioRad, lastProcessData, tickOffset, txt);
|
SetValues(logistics, lastProcessData, tickOffset, txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse)));
|
string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse)));
|
||||||
@ -246,18 +246,44 @@ public partial class ProcessData : IProcessData
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable IDE0060
|
#pragma warning disable IDE0060
|
||||||
private void SetValues(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, ProcessData lastProcessData, long tickOffset, TXT txt)
|
private static TXT Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad)
|
||||||
#pragma warning restore IDE0060
|
#pragma warning restore IDE0060
|
||||||
|
{
|
||||||
|
TXT result;
|
||||||
|
string[] files = Directory.GetFiles(Path.GetDirectoryName(logistics.ReportFullPath), string.Concat(originalDataBioRad, logistics.Sequence, "*"), SearchOption.TopDirectoryOnly);
|
||||||
|
foreach (string file in files)
|
||||||
|
fileInfoCollection.Add(new FileInfo(file));
|
||||||
|
string receivedData = File.ReadAllText(logistics.ReportFullPath);
|
||||||
|
// occasionally there are multiple blocks of details, get the last one as earlier ones may be aborted runs.
|
||||||
|
int index = receivedData.LastIndexOf("Bio-Rad");
|
||||||
|
if (index > -1)
|
||||||
|
receivedData = receivedData.Substring(index);
|
||||||
|
if (string.IsNullOrEmpty(receivedData))
|
||||||
|
result = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = new TXT(receivedData);
|
||||||
|
string directory = Path.GetDirectoryName(logistics.ReportFullPath);
|
||||||
|
string fileName = Path.Combine(directory, $"{Path.GetFileNameWithoutExtension(logistics.ReportFullPath)}.json");
|
||||||
|
string json = JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true });
|
||||||
|
File.WriteAllText(fileName, json);
|
||||||
|
fileInfoCollection.Add(new(fileName));
|
||||||
|
}
|
||||||
|
fileInfoCollection.Add(logistics.FileInfo);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetValues(Logistics logistics, ProcessData lastProcessData, long tickOffset, TXT txt)
|
||||||
{
|
{
|
||||||
string psn;
|
string psn;
|
||||||
string rds;
|
string rds;
|
||||||
string zone;
|
string zone;
|
||||||
string layer;
|
string layer;
|
||||||
string wafer;
|
string wafer;
|
||||||
|
int slot = 0;
|
||||||
Detail detail;
|
Detail detail;
|
||||||
string reactor;
|
string reactor;
|
||||||
int counter = 1;
|
int counter = 1;
|
||||||
int slot = 0;
|
|
||||||
List<Detail> details = new();
|
List<Detail> details = new();
|
||||||
StringBuilder titleFixed = new();
|
StringBuilder titleFixed = new();
|
||||||
StringBuilder waferFixed = new();
|
StringBuilder waferFixed = new();
|
||||||
@ -330,11 +356,15 @@ public partial class ProcessData : IProcessData
|
|||||||
Reactor = reactor;
|
Reactor = reactor;
|
||||||
Cassette = cassette;
|
Cassette = cassette;
|
||||||
Employee = employee;
|
Employee = employee;
|
||||||
JobID = logistics.JobID;
|
|
||||||
UniqueId = uniqueId;
|
UniqueId = uniqueId;
|
||||||
|
JobID = logistics.JobID;
|
||||||
|
StdDev = txt.Body.StdDev;
|
||||||
Slot = slot.ToString("00");
|
Slot = slot.ToString("00");
|
||||||
|
PassFail = txt.Body.PassFail;
|
||||||
Title = titleFixed.ToString();
|
Title = titleFixed.ToString();
|
||||||
Wafer = waferFixed.ToString();
|
Wafer = waferFixed.ToString();
|
||||||
|
MeanThickness = txt.Body.WaferMeanThickness;
|
||||||
|
RVThickness = txt.Footer.RadialVariationThickness;
|
||||||
foreach (Site site in txt.Body.Sites)
|
foreach (Site site in txt.Body.Sites)
|
||||||
{
|
{
|
||||||
detail = new()
|
detail = new()
|
||||||
@ -351,34 +381,6 @@ public partial class ProcessData : IProcessData
|
|||||||
_Details.AddRange(details);
|
_Details.AddRange(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable IDE0060
|
|
||||||
private static TXT Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad)
|
|
||||||
#pragma warning restore IDE0060
|
|
||||||
{
|
|
||||||
TXT result;
|
|
||||||
string[] files = Directory.GetFiles(Path.GetDirectoryName(logistics.ReportFullPath), string.Concat(originalDataBioRad, logistics.Sequence, "*"), SearchOption.TopDirectoryOnly);
|
|
||||||
foreach (string file in files)
|
|
||||||
fileInfoCollection.Add(new FileInfo(file));
|
|
||||||
string receivedData = File.ReadAllText(logistics.ReportFullPath);
|
|
||||||
// occasionally there are multiple blocks of details, get the last one as earlier ones may be aborted runs.
|
|
||||||
int index = receivedData.LastIndexOf("Bio-Rad");
|
|
||||||
if (index > -1)
|
|
||||||
receivedData = receivedData.Substring(index);
|
|
||||||
if (string.IsNullOrEmpty(receivedData))
|
|
||||||
result = null;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = new TXT(receivedData);
|
|
||||||
string directory = Path.GetDirectoryName(logistics.ReportFullPath);
|
|
||||||
string fileName = Path.Combine(directory, $"{Path.GetFileNameWithoutExtension(logistics.ReportFullPath)}.json");
|
|
||||||
string json = JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true });
|
|
||||||
File.WriteAllText(fileName, json);
|
|
||||||
fileInfoCollection.Add(new(fileName));
|
|
||||||
}
|
|
||||||
fileInfoCollection.Add(logistics.FileInfo);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
internal static List<Description> GetDescriptions(JsonElement[] jsonElements)
|
internal static List<Description> GetDescriptions(JsonElement[] jsonElements)
|
||||||
|
@ -21,4 +21,4 @@ public class Site
|
|||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
// Radial variation (computation B) PASS:
|
||||||
|
|
||||||
// thickness -2.7474
|
// thickness -2.7474
|
@ -28,6 +28,8 @@ public class TXT
|
|||||||
string @operator = GetBefore("batch:");
|
string @operator = GetBefore("batch:");
|
||||||
string batch = GetToEOL();
|
string batch = GetToEOL();
|
||||||
ScanPast("cassette:");
|
ScanPast("cassette:");
|
||||||
|
if (!receivedData.Contains("cassette:"))
|
||||||
|
title = string.Empty;
|
||||||
string cassette = GetBefore("wafer:");
|
string cassette = GetBefore("wafer:");
|
||||||
if (string.IsNullOrEmpty(batch))
|
if (string.IsNullOrEmpty(batch))
|
||||||
{
|
{
|
||||||
@ -106,33 +108,6 @@ public class TXT
|
|||||||
return str1;
|
return str1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetBefore(string text, bool trim)
|
|
||||||
{
|
|
||||||
string str;
|
|
||||||
string before;
|
|
||||||
if (!trim)
|
|
||||||
{
|
|
||||||
int num = _Data.IndexOf(text, _I);
|
|
||||||
if (num <= -1)
|
|
||||||
{
|
|
||||||
str = _Data.Substring(_I);
|
|
||||||
_I = _Data.Length;
|
|
||||||
before = str;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
str = _Data.Substring(_I, num - _I);
|
|
||||||
_I = num + text.Length;
|
|
||||||
before = str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
before = GetBefore(text);
|
|
||||||
}
|
|
||||||
return before;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetToEOL()
|
private string GetToEOL()
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
@ -143,16 +118,6 @@ public class TXT
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetToEOL(bool trim)
|
|
||||||
{
|
|
||||||
string str;
|
|
||||||
if (_Data.IndexOf("\n", _I) > -1)
|
|
||||||
str = !trim ? GetBefore("\n", false) : GetToEOL();
|
|
||||||
else
|
|
||||||
str = !trim ? GetBefore(Environment.NewLine, false) : GetToEOL();
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetToken()
|
private string GetToken()
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
@ -177,18 +142,6 @@ public class TXT
|
|||||||
return str.Trim();
|
return str.Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetToText(string text)
|
|
||||||
{
|
|
||||||
string str = _Data.Substring(_I, _Data.IndexOf(text, _I) - _I).Trim();
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsBlankLine()
|
|
||||||
{
|
|
||||||
int num = _Data.IndexOf("\n", _I);
|
|
||||||
return IsNullOrWhiteSpace(num > -1 ? _Data.Substring(_I, num - _I) : _Data.Substring(_I));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool IsNullOrWhiteSpace(string text)
|
private static bool IsNullOrWhiteSpace(string text)
|
||||||
{
|
{
|
||||||
bool flag;
|
bool flag;
|
||||||
@ -213,14 +166,6 @@ public class TXT
|
|||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string PeekNextLine()
|
|
||||||
{
|
|
||||||
int num = _I;
|
|
||||||
string toEOL = GetToEOL();
|
|
||||||
_I = num;
|
|
||||||
return toEOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ScanPast(string text)
|
private void ScanPast(string text)
|
||||||
{
|
{
|
||||||
int num = _Data.IndexOf(text, _I);
|
int num = _Data.IndexOf(text, _I);
|
||||||
@ -249,4 +194,4 @@ public class TXT
|
|||||||
|
|
||||||
// Radial variation (computation B) PASS:
|
// Radial variation (computation B) PASS:
|
||||||
|
|
||||||
// thickness -2.7474
|
// thickness -2.7474
|
Loading…
x
Reference in New Issue
Block a user