Ejemplo n.º 1
0
        // uses # of analyzers and goes across
        Row GenRawCycleRow(Cycle c)
        {
            Row row = new Row();
            IEnumerator iter = c.CountingAnalysisResults.GetMultiplicityEnumerator();
            int ecount = System.Enum.GetValues(typeof(RawCycles)).Length;
            int i = 0, repeat = 0;
            row.Add(0, c.seq.ToString()); // todo: what if we are skipping cycles?
            while (iter.MoveNext())
            {
                repeat = 1 + (ecount * i);
                Multiplicity mkey = (Multiplicity)((KeyValuePair<SpecificCountingAnalyzerParams, object>)(iter.Current)).Key;  // clean up this syntax, it's silly
                MultiplicityCountingRes mcr = (MultiplicityCountingRes)((KeyValuePair<SpecificCountingAnalyzerParams, object>)(iter.Current)).Value;

                row.Add((int)RawCycles.Singles + repeat, mcr.Totals.ToString());
                //row.Add((int)RawCycles.Singles + repeat, "0");
                row.Add((int)RawCycles.RA + repeat, mcr.RASum.ToString());
                row.Add((int)RawCycles.A + repeat, mcr.ASum.ToString());
                row.Add((int)RawCycles.QCTests + repeat, c.QCStatus(mkey).INCCString());
                i++;
            }
            return row;
        }
Ejemplo n.º 2
0
 internal static unsafe run_rec MoveCycleToRunRec(Cycle c, Multiplicity mkey)
 {
     run_rec res = new run_rec();
     res.run_number = (ushort)c.seq;
     byte[] b = StringSquish(c.DataSourceId.dt.ToString("yy.MM.dd"), INCC.DATE_TIME_LENGTH);
     TransferUtils.Copy(b, res.run_date);
     b = StringSquish(c.DataSourceId.dt.ToString("HH:mm:ss"), INCC.DATE_TIME_LENGTH);
     TransferUtils.Copy(b, res.run_time);
     QCStatus qc = c.QCStatus(mkey);
     b = StringSquish(QCTestStatusExtensions.INCCString(qc), INCC.MAX_RUN_TESTS_LENGTH);
     TransferUtils.Copy(b, res.run_tests);
     res.run_count_time = c.TS.TotalSeconds;
     res.run_singles = c.Totals; // raw counts
     MultiplicityCountingRes mcr = c.MultiplicityResults(mkey);
     res.run_scaler1 = mcr.Scaler1.v;
     res.run_scaler2 = mcr.Scaler2.v;
     res.run_reals_plus_acc = mcr.RASum;
     res.run_acc = mcr.ASum;
     TransferUtils.CopyULongsToDbls(mcr.RAMult, res.run_mult_reals_plus_acc);
     TransferUtils.CopyULongsToDbls(mcr.NormedAMult, res.run_mult_acc);
     res.run_singles_rate = mcr.DeadtimeCorrectedSinglesRate.v; // correct counts or not?
     res.run_doubles_rate = mcr.DeadtimeCorrectedDoublesRate.v;
     res.run_triples_rate = mcr.DeadtimeCorrectedTriplesRate.v;
     res.run_scaler1_rate = mcr.Scaler1Rate.v;
     res.run_scaler2_rate = mcr.Scaler2Rate.v;
     res.run_multiplicity_mult = mcr.multiplication;
     res.run_multiplicity_alpha = mcr.multiAlpha;
     res.run_multiplicity_efficiency = mcr.efficiency;
     res.run_mass = mcr.Mass;
     res.run_high_voltage = c.HighVoltage;
     return res;
 }
Ejemplo n.º 3
0
 // uses # of analyzers and goes across
 Row GenRateCycleRow(Cycle c, bool dtc = false)
 {
     IEnumerator iter = c.CountingAnalysisResults.GetMultiplicityEnumerator();
     Row row = new Row();
     int ecount = System.Enum.GetValues(typeof(RateCycles)).Length;
     int i = 0, repeat = 0;
     row.Add(0, c.seq.ToString());
     while (iter.MoveNext())
     {
         repeat = 1 + (ecount * i);
         Multiplicity mkey = (Multiplicity)((KeyValuePair<SpecificCountingAnalyzerParams, object>)(iter.Current)).Key;  // clean up this syntax, it's silly
         MultiplicityCountingRes mcr = (MultiplicityCountingRes)((KeyValuePair<SpecificCountingAnalyzerParams, object>)(iter.Current)).Value;
         if (dtc)
         {
             row.Add((int)RateCycles.Singles + repeat, mcr.DeadtimeCorrectedSinglesRate.v.ToString());
             row.Add((int)RateCycles.Doubles + repeat, mcr.DeadtimeCorrectedDoublesRate.v.ToString());
             row.Add((int)RateCycles.Triples + repeat, mcr.DeadtimeCorrectedTriplesRate.v.ToString());
         }
         else
         {
             row.Add((int)RateCycles.Singles + repeat, mcr.RawSinglesRate.v.ToString());
             row.Add((int)RateCycles.Doubles + repeat, mcr.RawDoublesRate.v.ToString());
             if (!meas.AcquireState.data_src.HappyFunName().Equals("Shift register")) // No such thing as raw triples for a shift register.  Don't print them. hn 5.13.2015
                 row.Add((int)RateCycles.Triples + repeat, mcr.RawTriplesRate.v.ToString());
             else
                 row.Add((int)RateCycles.Triples + repeat, "");
         }
         if (AssaySelector.ForMass(meas.MeasOption))
             //row.Add((int)RateCycles.Mass + repeat, mcr.Mass.ToString());
             row.Add((int)RateCycles.Mass + repeat, mcr.mass.ToString());
         else
             row.Add((int)RateCycles.Mass + repeat, String.Empty);
         row.Add((int)RateCycles.QCTests + repeat, c.QCStatus(mkey).INCCString());
         i++;
     }
     return row;
 }