Beispiel #1
0
 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];
 }
Beispiel #2
0
        public bool Transfer(BaseRate ba, RateResult rates)
        {
            if (rates == null)
            {
                return(true);
            }
            bool res = true;

            try
            {
                RatesResultEnhanced rrm = new RatesResultEnhanced(rates.numCompletedGates, ba.gateWidthTics);
                rrm.totaltime = new TimeSpan(this.TS.Ticks);
                countresults.Add(ba, rrm);
                rrm.TransferRawResult(rates);
            }
            catch (OutOfMemoryException e)
            {
                ba.reason = "BaseRate transfer " + e.Message;
                res       = false;
                logger?.TraceEvent(LogLevels.Error, 87405, ba.reason);
            }
            return(res);
        }