本文整理汇总了C#中Measurement.GetMessageList方法的典型用法代码示例。如果您正苦于以下问题:C# Measurement.GetMessageList方法的具体用法?C# Measurement.GetMessageList怎么用?C# Measurement.GetMessageList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Measurement
的用法示例。
在下文中一共展示了Measurement.GetMessageList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildMeasurement
//.........这里部分代码省略.........
mcr.triples_multi = results.triples_multi;
INCCResult result;
MeasOptionSelector mos = new MeasOptionSelector(meas.MeasOption, det.MultiplicityParams);
result = meas.INCCAnalysisState.Lookup(mos);
result.DeadtimeCorrectedRates.Singles.err = results.singles_err;
result.DeadtimeCorrectedRates.Doubles.err = results.doubles_err;
result.DeadtimeCorrectedRates.Triples.err = results.triples_err;
result.DeadtimeCorrectedRates.Singles.v = results.singles;
result.DeadtimeCorrectedRates.Doubles.v = results.doubles;
result.DeadtimeCorrectedRates.Triples.v = results.triples;
result.rates.RawRates.Scaler1s.v = results.scaler1;
result.rates.RawRates.Scaler2s.v = results.scaler2;
result.rates.RawRates.Scaler1s.err = results.scaler1_err;
result.rates.RawRates.Scaler2s.err = results.scaler2_err;
result.S1Sum = results.scaler1_sum;
result.S2Sum = results.scaler2_sum;
result.ASum = results.acc_sum;
result.RASum = results.reals_plus_acc_sum;
result.RAMult = TransferUtils.multarrayxfer(results.mult_reals_plus_acc_sum, INCC.MULTI_ARRAY_SIZE);
result.NormedAMult = TransferUtils.multarrayxfer(results.mult_acc_sum, INCC.MULTI_ARRAY_SIZE);
result.MaxBins = (ulong)Math.Max(result.RAMult.Length, result.NormedAMult.Length);
result.MinBins = (ulong)Math.Min(result.RAMult.Length, result.NormedAMult.Length);
mcr.RawDoublesRate.v = results.uncorrected_doubles;
mcr.RawDoublesRate.err = results.uncorrected_doubles_err;
result.singles_multi = results.singles_multi;
result.doubles_multi = results.doubles_multi;
result.triples_multi = results.triples_multi;
// hack expansion of Normed mult array to same length as Acc mult array on each cycle to accomodate TheoreticalOutlier calc array length bug
ExpandMaxBins(MaxBins, meas.Cycles, det.MultiplicityParams);
Bloat(MaxBins, mcr);
List<MeasurementMsg> msgs = meas.GetMessageList(det.MultiplicityParams);
// move the error messages
for (int i = 0; i < INCC.NUM_ERROR_MSG_CODES; i++)
{
int index = i * INCC.ERR_MSG_LENGTH;
string e = TransferUtils.str(results.error_msg_codes + index, INCC.ERR_MSG_LENGTH);
if (e.Length > 0)
meas.AddMessage(msgs, LogLevels.Error, 911, e, meas.MeasurementId.MeasDateTime);
}
// move the warning messages
for (int i = 0; i < INCC.NUM_WARNING_MSG_CODES; i++)
{
int index = i * INCC.ERR_MSG_LENGTH;
string w = TransferUtils.str(results.warning_msg_codes + index, INCC.ERR_MSG_LENGTH);
if (w.Length > 0)
meas.AddMessage(msgs, LogLevels.Warning, 411, w, meas.MeasurementId.MeasDateTime);
}
#region results transfer
INCCMethodResults imr;
bool got = meas.INCCAnalysisResults.TryGetINCCResults(det.MultiplicityParams, out imr); // only ever this single mkey for INCC5-style transfer import, (thankfully)
if (got)
imr.primaryMethod = OldToNewMethodId(results.primary_analysis_method);
// check these results against the meas.MeasOption expectation => seems to always be 1 - 1 with (opt, sr) -> results, and subresults only for verif and calib choice
// rates -> none,
// bkg -> bkg, norm -> bias, init src -> init src, prec -> prec,
// calib -> calib, 1 or more INCC methods on the methods submap
// verif -> 1 or more INCC methods on the methods submap
foreach (iresultsbase r in itf.method_results_list)
{
if (r is results_init_src_rec)
{
示例2: MoveResultsRec
//.........这里部分代码省略.........
mcr = m.CountingAnalysisResults.GetFirstMultiplicity;
}
if (mcr == null)
mcr = new MultiplicityCountingRes(); // inadequate attempt tries to account for LM-only condition, where no mcr, or no matching mcr, exists
rec.r_acc_sngl_test_rate_limit = m.Tests.accSnglTestRateLimit;
rec.r_acc_sngl_test_precision_limit = m.Tests.accSnglTestPrecisionLimit;
rec.r_acc_sngl_test_outlier_limit = m.Tests.accSnglTestOutlierLimit;
rec.r_outlier_test_limit = m.Tests.outlierTestLimit;
rec.r_bkg_doubles_rate_limit = m.Tests.bkgDoublesRateLimit;
rec.r_bkg_triples_rate_limit = m.Tests.bkgTriplesRateLimit;
rec.r_chisq_limit = m.Tests.chiSquaredLimit;
rec.r_max_num_failures = m.Tests.maxNumFailures;
rec.r_high_voltage_test_limit = m.Tests.highVoltageTestLimit;
rec.r_normal_backup_assay_test_lim = m.Tests.normalBackupAssayTestLimit;
rec.r_max_runs_for_outlier_test = m.Tests.maxCyclesForOutlierTest;
rec.r_checksum_test = (byte)(m.Tests.checksum ? 1 : 0);
rec.results_accidentals_method = (m.Tests.accidentalsMethod == AccidentalsMethod.Measure ? INCC.IDC_MEASURE_ACCIDENTALS : INCC.IDC_CALCULATE_ACCIDENTALS);
rec.passive_bkg_singles_rate = m.Background.DeadtimeCorrectedRates.Singles.v;
rec.passive_bkg_singles_rate_err = m.Background.DeadtimeCorrectedRates.Singles.err;
rec.passive_bkg_doubles_rate = m.Background.DeadtimeCorrectedRates.Doubles.v;
rec.passive_bkg_doubles_rate_err = m.Background.DeadtimeCorrectedRates.Doubles.err;
rec.passive_bkg_triples_rate = m.Background.DeadtimeCorrectedRates.Triples.v;
rec.passive_bkg_triples_rate_err = m.Background.DeadtimeCorrectedRates.Triples.err;
rec.active_bkg_singles_rate = m.Background.INCCActive.Singles.v;
rec.active_bkg_singles_rate_err = m.Background.INCCActive.Singles.err;
rec.passive_bkg_scaler1_rate = m.Background.Scaler1.v;
rec.passive_bkg_scaler2_rate = m.Background.Scaler2.v;
rec.active_bkg_scaler1_rate = m.Background.INCCActive.Scaler1Rate;
rec.active_bkg_scaler2_rate = m.Background.INCCActive.Scaler2Rate;
List<MeasurementMsg> msgs = m.GetMessageList(m.Detector.MultiplicityParams);
byte[] bb = new byte[INCC.NUM_ERROR_MSG_CODES * INCC.ERR_MSG_LENGTH];
int indx = 0, recidx = 0;
for (int i = 0; i < msgs.Count && recidx < INCC.NUM_ERROR_MSG_CODES; i++)
{
if (msgs.Count > i && string.IsNullOrEmpty(msgs[i].text) && msgs[i].IsError)
{
char[] aa = msgs[i].text.ToCharArray(0, Math.Min(msgs[i].text.Length, INCC.ERR_MSG_LENGTH));
Encoding.ASCII.GetBytes(aa, 0, aa.Length, bb, indx);
recidx++;
}
indx += INCC.ERR_MSG_LENGTH;
}
TransferUtils.Copy(bb, 0, rec.error_msg_codes, 0, INCC.NUM_ERROR_MSG_CODES * INCC.ERR_MSG_LENGTH);
bb = new byte[INCC.NUM_ERROR_MSG_CODES * INCC.ERR_MSG_LENGTH];
indx = 0; recidx = 0;
for (int i = 0; i < msgs.Count && recidx < INCC.NUM_ERROR_MSG_CODES; i++)
{
if (msgs.Count > i && string.IsNullOrEmpty(msgs[i].text) && msgs[i].IsWarning)
{
char[] aa = msgs[i].text.ToCharArray(0, Math.Min(msgs[i].text.Length, INCC.ERR_MSG_LENGTH));
Encoding.ASCII.GetBytes(aa, 0, aa.Length, bb, indx);
recidx++;
}
indx += INCC.ERR_MSG_LENGTH;
}
TransferUtils.Copy(bb, 0, rec.warning_msg_codes, 0, INCC.NUM_ERROR_MSG_CODES * INCC.ERR_MSG_LENGTH);
// these ride on, or can be computed from, m.Cycles, but they sum across multiple analyzers and so are not considered complete yet for LM measurements
rec.total_number_runs = (ushort)m.Cycles.GetValidCycleCount(); // any and all cycles
rec.number_good_runs = (ushort)m.Cycles.GetUseableCycleCount(); // those that are marked OK
rec.total_good_count_time = (ushort)m.Cycles.GetUseableCycleCount() * m.AcquireState.run_count_time; // check against time on first cycle, to assert