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


C# Measurement.Persist方法代码示例

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


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

示例1: BuildMeasurement


//.........这里部分代码省略.........
                    else
                    {
                        mlogger.TraceEvent(LogLevels.Warning, 34040, ("todo: Transferring method results for " + r.GetType().ToString())); // todo: complete the list
                    }
                }

            }
            #endregion results transfer
            // dev note: here is where the detector tree creation and replacement with restore_replace_detector_structs occurs in the original code
            // todo: based on overwrite flag, replace det-dependent classes, the analysis_methods: (none-map) and each (det,mat) -> calib from results class instances

            #region Meas&Results

            AnalysisDefs.holdup_config_rec hc = new AnalysisDefs.holdup_config_rec();
            hc.glovebox_id = TransferUtils.str(results.results_glovebox_id, INCC.MAX_GLOVEBOX_ID_LENGTH);
            hc.num_columns = results.results_num_columns;
            hc.num_rows = results.results_num_rows;
            hc.distance = results.results_distance;
            meas.AcquireState.glovebox_id = hc.glovebox_id;
            // this is a good place to create the general results_rec
            INCCResults.results_rec xres = new INCCResults.results_rec(meas);
            meas.INCCAnalysisResults.TradResultsRec = xres;
            // oddball entries in need of preservation
            xres.total_good_count_time = results.total_good_count_time;
            xres.total_number_runs = results.total_number_runs;
            xres.primary = imr.primaryMethod;
            xres.net_drum_weight = results.net_drum_weight;
            xres.completed = (results.completed != 0 ? true : false);
            xres.db_version = results.db_version;
            xres.hc = hc;
            xres.original_meas_date = INCC.DateFrom(TransferUtils.str(results.original_meas_date, INCC.DATE_TIME_LENGTH));
            // NEXT: copy move passive and active meas id's here

             long mid = meas.Persist();

            // save the warning and error messages from the results here, these rode on the results rec in INCC5
            NC.App.DB.AddAnalysisMessages(msgs, mid);

            // Store off Params

            NC.App.DB.UpdateDetector(det);
            NC.App.DB.NormParameters.Set(det, meas.Norm);  // might have been saved in earlier step already
            NC.App.DB.BackgroundParameters.Set(det, meas.Background);

            INCCDB.AcquireSelector acqsel = new INCCDB.AcquireSelector(det, acq.item_type, acq.MeasDateTime);
            if (overwrite)
            {
                NC.App.DB.ReplaceAcquireParams(acqsel, acq);
            }
            else
                NC.App.DB.AddAcquireParams(acqsel, acq); // gotta add it to the global map, then push it to the DB

            if (meas.Tests != null) // added only if not found on the list
                NC.App.DB.TestParameters.Set(meas.Tests);

            NC.App.DB.Isotopics.SetList();  // new style de 'mouser'!
            //NC.App.DB.CompositeIsotopics.SetList();// next:NYI
            NC.App.DB.ItemIds.SetList(); // This writes any new items ids to the DB
            NC.App.DB.CollarItemIds.SetList(); // so does this

            //Loop over measurement cycles
            NC.App.DB.AddCycles(meas.Cycles, det.MultiplicityParams, mid);

            //Store off Params

            // todo: complete table design and creation/update here, still have issues with collar and curium ratio results
开发者ID:hnordquist,项目名称:INCC6,代码行数:67,代码来源:INCCKnew.cs


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