当前位置: 首页>>代码示例>>C#>>正文


C# Measurement.SetQCStatus方法代码示例

本文整理汇总了C#中Measurement.SetQCStatus方法的典型用法代码示例。如果您正苦于以下问题:C# Measurement.SetQCStatus方法的具体用法?C# Measurement.SetQCStatus怎么用?C# Measurement.SetQCStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Measurement的用法示例。


在下文中一共展示了Measurement.SetQCStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ComputeFromINCC5SRData

        // assumes initalized measurement with at least one cycle, and at least one defined counting analysis result indexed by the detector's mult params, including VSRs fror LM
        void ComputeFromINCC5SRData(Measurement m)
        {
            string pre = (m.AcquireState.data_src == ConstructedSource.Reanalysis ? "Rec" : "C");
            ctrllog.TraceEvent(LogLevels.Info, 34071, pre + "omputing: '" + m.MeasurementId.MeasDateTime.ToString() + ", " + m.MeasOption.PrintName() + "'");
            if (m.Cycles.Count < 1)
            {
                ctrllog.TraceEvent(LogLevels.Error, 34830, "Skipping, no cycles on '" + m.MeasurementId.MeasDateTime.ToString() + ", " + m.MeasOption.PrintName() + "'");
                return;
            }

            if (m.CountingAnalysisResults.Count < 1 || !m.CountingAnalysisResults.HasMultiplicity)
            {
                ctrllog.TraceEvent(LogLevels.Error, 34831, "Bad match between detector and this file type." + (!m.CountingAnalysisResults.HasMultiplicity ? " No Multiplicity counter defined." : ""));
                return; //bad match between detector and this file type.
            }

            SRInstrument PseudoInstrument = new SRInstrument(m.Detector);
            PseudoInstrument.selected = true;
            if (!Instruments.Active.Contains(PseudoInstrument))
                Instruments.Active.Add(PseudoInstrument); // add to global runtime list

            m.CurrentRepetition = 0;
            NC.App.Opstate.SOH = OperatingState.Living;

            try
            {
                MultiplicityCountingRes mcr = (MultiplicityCountingRes)m.CountingAnalysisResults[m.Detector.MultiplicityParams]; // APluralityOfMultiplicityAnalyzers: check for use of multiple analyzers
                // start counting using the per-cycle accumulation of summary results
                Array.Clear(mcr.RAMult, 0, mcr.RAMult.Length);
                Array.Clear(mcr.NormedAMult, 0, mcr.NormedAMult.Length);
                Array.Clear(mcr.UnAMult, 0, mcr.UnAMult.Length);

                mcr.AB.TransferIntermediates(src: m.Detector.AB);  // remove, redundant copy in most cases
                CycleList cl = m.Cycles;
                m.Cycles = new CycleList();
                foreach (Cycle cycle in cl) // process incrementally to match expected outlier processing behavior from INCC
                {
                    if (NC.App.Opstate.IsQuitRequested)  // exit via abort or quit/save, follow-on code decides to continue with processing
                    {
                        ctrllog.TraceEvent(LogLevels.Warning, 430, "Cycle first-pass processing " + NC.App.Opstate.CancelStopAbortStateRep + " at sequence #" + cycle.seq + ", " + m.CurrentRepetition);
                        break;
                    }
                    m.CurrentRepetition++;
                    m.Cycles.Add(cycle);
                    m.SetQCStatus(cycle);
                    CycleProcessing.ApplyTheCycleConditioningSteps(cycle, m);
                    m.CycleStatusTerminationCheck(cycle);
                    ctrllog.TraceEvent(LogLevels.Verbose, 5439, "Cycle " + cycle.seq.ToString());
                    if (m.CurrentRepetition % 8 == 0)
                        FireEvent(EventType.ActionInProgress, this);
                }
                FireEvent(EventType.ActionInProgress, this);
                // trim any None's that were not processed (occurs during a cancel/stop intervention)
                m.Cycles.Trim(m.Detector.MultiplicityParams); // APluralityOfMultiplicityAnalyzers: expand when detector has multiple analyzers
            }
            catch (Exception e)
            {
                NC.App.Opstate.SOH = OperatingState.Trouble;
                ctrllog.TraceException(e, true);
                ctrllog.TraceEvent(LogLevels.Warning, 430, "Processing stopped at cycle " + m.CurrentRepetition);
            }
            finally
            {
                NC.App.Loggers.Flush();
            }

            if (!NC.App.Opstate.IsAbortRequested)  // stop/quit means continue with what is available
            {
                if (m.HasReportableData)
                {
                    m.CalculateMeasurementResults();
                    new ReportMangler(ctrllog).GenerateReports(m);
                    m.SaveMeasurementResults();
                }
            }
            NC.App.Opstate.ResetTokens();
            Instruments.All.Remove(PseudoInstrument);
        }
开发者ID:hnordquist,项目名称:INCC6,代码行数:79,代码来源:FileCtrlINCC5.cs


注:本文中的Measurement.SetQCStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。