Example #1
0
        public Feynman GetFirstFeynman(bool activeOnly = true, bool addIfNotPresent = false)
        {
            List <SpecificCountingAnalyzerParams> l = GetFeynmans(activeOnly);

            if (l != null && l.Count > 0)
            {
                return((Feynman)l[0]);
            }
            else
            {
                Feynman t = new Feynman();
                if (addIfNotPresent)
                {
                    Add(t);
                }
                return(t);
            }
        }
Example #2
0
        public bool Transfer(Feynman ryp, FeynmanResult fr)
        {
            if (fr == null)
            {
                return(true);
            }
            bool res = true;

            try
            {
                FeynmanResultExt lfr = new FeynmanResultExt();
                countresults.Add(ryp, lfr);
                lfr.TransferRawResult(fr);
            }
            catch (OutOfMemoryException e)
            {
                ryp.reason = "Feynman transfer " + e.Message;
                res        = false;
                logger?.TraceEvent(LogLevels.Error, 87407, ryp.reason);
            }
            return(res);
        }