Ejemplo n.º 1
0
        public Rossi GetFirstRossi(bool activeOnly = true, bool addIfNotPresent = false)
        {
            List <SpecificCountingAnalyzerParams> l = GetRossis(activeOnly);

            if (l != null && l.Count > 0)
            {
                return((Rossi)l[0]);
            }
            else
            {
                Rossi t = new Rossi();
                if (addIfNotPresent)
                {
                    Add(t);
                }
                return(t);
            }
        }
Ejemplo n.º 2
0
        public bool Transfer(Rossi rap, RossiAlphaResult rar)
        {
            if (rar == null)
            {
                return(true);
            }
            bool res = true;

            try
            {
                RossiAlphaResultExt ra = new RossiAlphaResultExt(rar.gateWidth, rar.gateData);   // deep copy via constructor menas no extra transfer function is needed
                countresults.Add(rap, ra);
            }
            catch (OutOfMemoryException e)
            {
                rap.reason = "Rossi transfer " + e.Message;
                res        = false;
                logger?.TraceEvent(LogLevels.Error, 87408, rap.reason);
            }
            return(res);
        }