public void UpdateWithMeasurement() { Measurement = NC.App.Opstate.Measurement; }
public virtual void StartReportGeneration(Measurement m, string pretext, char separator = '\t', string suffixoverride = null) { PrepForReportGeneration(m, separator); CreateOutputFile(GenBaseFileName(pretext), suffixoverride); // use the default name generator GenBaseFileName }
public override void StartReportGeneration(Measurement m, string pretext, char separator, string suffixoverride = null) // space char as separator forces text report generation { base.StartReportGeneration(m, pretext, separator, suffixoverride); }
public void GenerateReport(Measurement m) { if (N.App.Opstate.IsAbortRequested) // handle stop, cancel, abort here, for stop does it roll back all report gen from here? { return; } IEnumerator iter = m.INCCAnalysisResults.GetMeasSelectorResultsEnumerator(); while (iter.MoveNext()) { MeasOptionSelector moskey = (MeasOptionSelector)iter.Current; INCCResult ir = m.INCCAnalysisResults[moskey]; // create one results for each SR key StartReportGeneration(m, m.MeasOption.PrintName() + " INCC " + (m.INCCAnalysisResults.Count > 1 ? "[" + moskey.MultiplicityParams.ShortName() + "] " : ""), // add an identifying signature to each file name if more than one active virtual SR ' '); // make these text files //Detector det = meas.Detectors.GetIt(moskey.SRParams); // now assuming only one detector on the list, so can use [0], the mos keys have specific values for virtual SR counting, overiding the detector Detector det = meas.Detectors[0]; try { sections.Add(ConstructReportSection(INCCReportSection.Header, det)); sections.Add(ConstructReportSection(INCCReportSection.Context, det)); sections.Add(ConstructReportSection(INCCReportSection.Isotopics, det)); sections.Add(ConstructReportSection(INCCReportSection.ShiftRegister, det, moskey)); sections.Add(ConstructReportSection(INCCReportSection.Adjustments, det)); sections.Add(ConstructReportSection(INCCReportSection.CycleSummary, det, moskey)); sections.Add(ConstructReportSection(INCCReportSection.Messages, det, moskey)); sections.Add(ConstructReportSection(INCCReportSection.SummedRawData, moskey, ir, det)); sections.Add(ConstructReportSection(INCCReportSection.SummedRA, moskey, ir, det)); sections.Add(ConstructReportSection(INCCReportSection.MassResults, moskey, ir, det)); sections.Add(ConstructReportSection(INCCReportSection.MethodResultsAndParams, moskey, ir, det)); sections.Add(ConstructReportSection(INCCReportSection.RawCycles, moskey, ir, det)); sections.Add(ConstructReportSection(INCCReportSection.DTCRateCycles, moskey, ir, det)); sections.Add(ConstructReportSection(INCCReportSection.MultiplicityDistributions, moskey, ir, det)); sections.Add(ConstructReportSection(INCCReportSection.Reference, det)); sections.RemoveAll(s => (s == null)); // copy all section rows to the report row list (t.rows) int rowcount = 0; foreach (Section sec in sections) { rowcount += sec.Count; } Array.Resize(ref t.rows, rowcount); int idx = 0; foreach (Section sec in sections) { Array.Copy(sec.ToArray(), 0, t.rows, idx, sec.Count); idx += sec.Count; } } catch (Exception e) { ctrllog.TraceException(e); } FinishReportGeneration(); } }
public override void StartReportGeneration(Measurement m, string pretext, char separator, string suffixoverride = null) // space char as separator forces text report generation { base.StartReportGeneration(m, pretext, separator); m.INCCResultsFileNames.Add(t.FullFilePath); // save the full file path on this list for later }