示例#1
0
        /// <summary>
        ///  Tailored only for LMMM/NPOD!
        ///  this looks at the status block content and sets the cycle status; Rates, Assay Cancelled, Status, are the three I've seen in data so far
        /// </summary>
        /// <param name="sb"></param>
        /// <param name="text"></param>
        /// <param name="stat"></param>
        public void ParseStatusBlock(StreamStatusBlock sb, Cycle cycle)
        {
            //'Assay Cancelled. ' == Cancelled,
            // Completed ==  status block found at end of file or at cycle finish time
            // 'Rates = 0,0,0,0,1,6,0,54,0,0,0,0,1071,546,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0' == Rates (see e.g. GDND/2010_10_20_155930_0.ncd)
            CycleDAQStatus stat = CycleDAQStatus.UnspecifiedTruncation;
            string         text = "";

            if (sb != null)
            {
                sb.Decode(State.rawDataBuff);
                if (!String.IsNullOrEmpty(sb.msg))
                {
                    if (text.StartsWith("Assay Cancelled."))  // dev note: string constants that should live in the LMMMLingo class.
                    {
                        stat = CycleDAQStatus.Cancelled;
                    }
                    else if (text.StartsWith("Rates ="))
                    {
                        stat = CycleDAQStatus.Rates;
                    }
                    else
                    {
                        stat = CycleDAQStatus.Completed;
                    }
                }
                else
                {
                    stat = CycleDAQStatus.UnspecifiedTruncation;
                }
            }
            cycle.DaqStatus = stat;
            cycle.Message   = text;
        }
示例#2
0
文件: Cycle.cs 项目: radtek/INCC6
 /// <summary>
 /// Sets the status of the cycle stream processing if processing ended before a fully formed status block was parsed.
 /// The status is None if no end block was encountered, and if it is none and the parsed message is empty, set status to UnspecifiedTruncation
 /// </summary>
 public void SetDatastreamEndStatus()
 {
     if (daqStatus == CycleDAQStatus.None && string.IsNullOrEmpty(Message))
     {
         // cycle was completed abnormally due to interruption or premature end of stream
         daqStatus = CycleDAQStatus.UnspecifiedTruncation;
     }
     //else if (String.IsNullOrEmpty(Message))
     //    logger.TraceEvent(NCCReporter.LogLevels.Verbose, 7832, "SetStatus on cycle {0}", daqStatus);
 }
示例#3
0
文件: Cycle.cs 项目: radtek/INCC6
 public Cycle(LMLoggers.LognLM logger = null)
 {
     // Raw counts aka totals
     singles      = new VTuple();
     dsid         = new DataSourceIdentifier();
     qcstatus     = new QCStatusMap();
     countresults = new CountingResults();
     daqStatus    = CycleDAQStatus.None;
     this.logger  = logger;
     hitsPerChn   = new double[NC.ChannelCount];
 }
示例#4
0
文件: Cycle.cs 项目: radtek/INCC6
 public Cycle(Cycle copyFrom)
 {
     // Raw counts aka totals
     singles  = new VTuple(copyFrom.singles);
     dsid     = new DataSourceIdentifier(copyFrom.dsid);
     qcstatus = new QCStatusMap();
     foreach (KeyValuePair <Multiplicity, QCStatus> kvp in copyFrom.qcstatus)
     {
         qcstatus.Add(kvp.Key, kvp.Value);
     }
     countresults = new CountingResults();
     foreach (KeyValuePair <SpecificCountingAnalyzerParams, object> cr in copyFrom.countresults)
     {
         countresults.Add(cr.Key, cr.Value);
     }
     daqStatus   = CycleDAQStatus.None;
     ts          = copyFrom.TS;
     this.logger = null;
     hitsPerChn  = new double[NC.ChannelCount];
 }
示例#5
0
文件: Cycle.cs 项目: hnordquist/INCC6
        private TimeSpan ts; // timestamp of last neutron v. requested time

        #endregion Fields

        #region Constructors

        public Cycle(LMLoggers.LognLM logger)
        {
            // Raw counts aka totals
            singles = new VTuple();
            dsid = new DataSourceIdentifier();
            qcstatus = new QCStatusMap();
            countresults = new CountingResults();
            daqStatus = CycleDAQStatus.None;
            this.logger = logger;
            hitsPerChn = new double[NC.ChannelCount];
        }
示例#6
0
文件: Cycle.cs 项目: hnordquist/INCC6
 /// <summary>
 /// Sets the status of the cycle stream processing if processing ended before a fully formed status block was parsed.
 /// The status is None if no end block was encountered, and if it is none and the parsed message is empty, set status to UnspecifiedTruncation
 /// </summary>
 public void SetDatastreamEndStatus()
 {
     if (daqStatus == CycleDAQStatus.None && string.IsNullOrEmpty(Message))
         // cycle was completed abnormally due to interruption or premature end of stream
         daqStatus = CycleDAQStatus.UnspecifiedTruncation;
     //else if (String.IsNullOrEmpty(Message))
     //    logger.TraceEvent(NCCReporter.LogLevels.Verbose, 7832, "SetStatus on cycle {0}", daqStatus);
 }