Example #1
0
        protected Section ConstructReportSection(INCCTestDataSection section, MeasOptionSelector moskey, Detector det)
        {
            INCCTestDataStyle sec = null;

            try
            {
                switch (section)
                {
                case INCCTestDataSection.CyclesWithMultiplicityDistributions:
                    sec = new INCCTestDataStyle(null, 0, INCCStyleSection.ReportSection.MultiColumn);
                    //Singles 1st Scaler 2nd Scaler Reals + Accidentals Accidentals
                    int[] crdwidths = new int[] { 10, 10, 10, 10, 10 };
                    int[] srawidths = new int[] { 12, 12 };
                    foreach (Cycle cyc in meas.Cycles)
                    {
                        // if no results on the cycle, these map indexers throw
                        if (cyc.CountingAnalysisResults.GetResultsCount(typeof(Multiplicity)) > 0)                                // if no results on the cycle, these map indexers throw
                        {
                            MultiplicityCountingRes mcr = (MultiplicityCountingRes)cyc.CountingAnalysisResults[moskey.MultiplicityParams];
                            sec.AddColumnRow(
                                new ulong[] { (ulong)mcr.Totals, (ulong)mcr.Scaler1.v, (ulong)mcr.Scaler2.v, (ulong)mcr.RASum, (ulong)mcr.ASum },
                                crdwidths);
                            int minbin, maxbin;
                            minbin = Math.Min(mcr.RAMult.Length, mcr.NormedAMult.Length);
                            maxbin = Math.Max(mcr.RAMult.Length, mcr.NormedAMult.Length);
                            sec.AddOne(maxbin);
                            for (int i = 0; i < minbin; i++)
                            {
                                sec.AddColumnRow(new ulong[] { mcr.RAMult[i], mcr.NormedAMult[i] }, srawidths);
                            }
                            for (int i = minbin; i < maxbin; i++)      // check for uneven column
                            {
                                ulong[] potential = new ulong[2];
                                if (i < mcr.RAMult.Length)
                                {
                                    potential[0] = mcr.RAMult[i];
                                }
                                if (i < mcr.NormedAMult.Length)
                                {
                                    potential[1] = mcr.NormedAMult[i];
                                }
                                sec.AddColumnRow(potential, srawidths);
                            }
                        }
                    }
                    break;

                default:
                    break;
                }
            }
            catch (Exception e)
            {
                ctrllog.TraceException(e);
            }
            return(sec);
        }
Example #2
0
        protected Section ConstructReportSection(INCCTestDataSection section, Detector det, MeasOptionSelector moskey = null)
        {
            INCCTestDataStyle sec = null;

            try
            {
                switch (section)
                {
                case INCCTestDataSection.CycleSummary:
                    sec = new INCCTestDataStyle(null, 0);
                    sec.AddOne((Int32)meas.Cycles.GetValidCycleCountForThisKey(moskey.MultiplicityParams));      // could also use CycleList length but CycleList can be longer when a reanalysis occurs and the analysis processing stops short of the end of the list due to modified termination conditions
                    sec.AddOne((Int32)(meas.Cycles.Count > 0 ? meas.Cycles[0].TS.TotalSeconds : 0.0));
                    break;

                default:
                    break;
                }
            }
            catch (Exception e)
            {
                ctrllog.TraceException(e);
            }
            return(sec);
        }
Example #3
0
        protected Section ConstructReportSection(INCCTestDataSection section, Detector det, MeasOptionSelector moskey = null)
        {
            INCCTestDataStyle sec = null;
            try
            {
                switch (section)
                {
                    case INCCTestDataSection.CycleSummary:
                        sec = new INCCTestDataStyle(null, 0);
                        sec.AddOne( (Int32)meas.Cycles.GetValidCycleCountForThisKey(moskey.MultiplicityParams)); // could also use CycleList length but CycleList can be longer when a reanalysis occurs and the analysis processing stops short of the end of the list due to modified termination conditions
                        sec.AddOne( (Int32)(meas.Cycles.Count > 0 ? meas.Cycles[0].TS.TotalSeconds : 0.0));
                        break;

                    default:
                        break;
                }
            }
            catch (Exception e)
            {
                ctrllog.TraceException(e);
            }
            return sec;
        }
Example #4
0
        protected Section ConstructReportSection(INCCTestDataSection section, MeasOptionSelector moskey,  Detector det)
        {
            INCCTestDataStyle sec = null;
            try
            {
                switch (section)
                {

                    case INCCTestDataSection.CyclesWithMultiplicityDistributions:
                        sec = new INCCTestDataStyle(null, 0, INCCStyleSection.ReportSection.MultiColumn);
                        //Singles 1st Scaler 2nd Scaler Reals + Accidentals Accidentals
                        int[] crdwidths = new int[] {10, 10, 10, 10, 10 };
                        int[] srawidths = new int[] { 12, 12 };
                        foreach (Cycle cyc in meas.Cycles)
                        {
                            // if no results on the cycle, these map indexers throw
                            if (cyc.CountingAnalysisResults.GetResultsCount(typeof(Multiplicity)) > 0)                            // if no results on the cycle, these map indexers throw
                            {
                                MultiplicityCountingRes mcr = (MultiplicityCountingRes)cyc.CountingAnalysisResults[moskey.MultiplicityParams];
                                sec.AddColumnRow(
                                    new ulong[] { (ulong)mcr.Totals, (ulong)mcr.Scaler1.v, (ulong)mcr.Scaler2.v, (ulong)mcr.RASum, (ulong)mcr.ASum },
                                     crdwidths);
                                int minbin, maxbin;
                                minbin = Math.Min(mcr.RAMult.Length, mcr.NormedAMult.Length);
                                maxbin = Math.Max(mcr.RAMult.Length, mcr.NormedAMult.Length);
                                sec.AddOne(maxbin);
                                for (int i = 0; i < minbin; i++)
                                    sec.AddColumnRow(new ulong[] { mcr.RAMult[i], mcr.NormedAMult[i] }, srawidths);
                                for (int i = minbin; i < maxbin; i++)  // check for uneven column
                                {
                                    ulong[] potential = new ulong[2];
                                    if (i < mcr.RAMult.Length)
                                        potential[0] = mcr.RAMult[i];
                                    if (i < mcr.NormedAMult.Length)
                                        potential[1] = mcr.NormedAMult[i];
                                    sec.AddColumnRow(potential, srawidths);
                                }
                            }
                        }
                        break;

                    default:
                        break;
                }
            }
            catch (Exception e)
            {
                ctrllog.TraceException(e);
            }
            return sec;
        }