/// <summary> /// retrieves the most recent acquire record and associated detector /// </summary> /// <param name="acq"></param> /// <param name="det"></param> public static void GetCurrentAcquireDetectorPair(ref AcquireParameters acq, ref Detector det) { acq = CentralizedState.App.DB.LastAcquire(); String curdet = acq.detector_id; det = CentralizedState.App.DB.Detectors.Find(d => string.Compare(d.Id.DetectorName, curdet, true) == 0); if (det == null || string.IsNullOrWhiteSpace(det.Id.DetectorName)) { det = new AnalysisDefs.Detector(); CentralizedState.App.Logger(LMLoggers.AppSection.App).TraceEvent(LogLevels.Warning, 32444, "Detector " + curdet + " is not defined in the database"); } if (det.ListMode) { det.MultiplicityParams.FA = acq.lm.FADefault; } }
public static Detector GetCurrentAcquireDetector() { Detector det = null; AcquireParameters acq = CentralizedState.App.DB.LastAcquire(); string curdet = acq.detector_id; det = CentralizedState.App.DB.Detectors.Find(d => string.Compare(d.Id.DetectorName, curdet, true) == 0); if (det == null) { det = new AnalysisDefs.Detector(); } if (det.ListMode) { det.MultiplicityParams.FA = acq.lm.FADefault; } return(det); }
public static void SetNewCurrentDetector(string name) { AcquireParameters acq = GetCurrentAcquireParams(); Detector det = CentralizedState.App.DB.Detectors.Find(d => string.Compare(d.Id.DetectorName, name, true) == 0); if (det == null) { det = new AnalysisDefs.Detector(); } acq.MeasDateTime = DateTime.Now; if (!acq.detector_id.Equals(name, StringComparison.OrdinalIgnoreCase) || !acq.meas_detector_id.Equals(name, StringComparison.OrdinalIgnoreCase)) { acq.detector_id = string.Copy(name); acq.meas_detector_id = string.Copy(name); CentralizedState.App.DB.AcquireParametersMap().Add(new INCCDB.AcquireSelector(det, acq.item_type, acq.MeasDateTime), acq); } CentralizedState.App.DB.UpdateAcquireParams(acq, det.ListMode); CentralizedState.App.Logger(LMLoggers.AppSection.Control).TraceEvent(LogLevels.Info, 32444, "The current detector is now " + name); }
public static void SetNewCurrentDetector(string name) { AcquireParameters acq = GetCurrentAcquireParams(); Detector det = CentralizedState.App.DB.Detectors.Find(d => string.Compare(d.Id.DetectorName, name, true) == 0); if (det == null) det = new AnalysisDefs.Detector(); acq.MeasDateTime = DateTime.Now; if (!acq.detector_id.Equals(name, StringComparison.OrdinalIgnoreCase) || !acq.meas_detector_id.Equals(name, StringComparison.OrdinalIgnoreCase)) { acq.detector_id = string.Copy(name); acq.meas_detector_id = string.Copy(name); CentralizedState.App.DB.AcquireParametersMap().Add(new INCCDB.AcquireSelector(det, acq.item_type, acq.MeasDateTime), acq); } CentralizedState.App.DB.UpdateAcquireParams(acq, det.ListMode); CentralizedState.App.Logger(LMLoggers.AppSection.Control).TraceEvent(LogLevels.Info, 32444, "The current detector is now " + name); }
public static Detector GetCurrentAcquireDetector() { Detector det = null; AcquireParameters acq = CentralizedState.App.DB.LastAcquire(); string curdet = acq.detector_id; det = CentralizedState.App.DB.Detectors.Find(d => string.Compare(d.Id.DetectorName, curdet, true) == 0); if (det == null) det = new AnalysisDefs.Detector(); if (det.ListMode) det.MultiplicityParams.FA = acq.lm.FADefault; return det; }
/// <summary> /// retrieves the most recent acquire record and associated detector /// </summary> /// <param name="acq"></param> /// <param name="det"></param> public static void GetCurrentAcquireDetectorPair(ref AcquireParameters acq, ref Detector det) { acq = CentralizedState.App.DB.LastAcquire(); String curdet = acq.detector_id; det = CentralizedState.App.DB.Detectors.Find(d => string.Compare(d.Id.DetectorName, curdet, true) == 0); if (det == null || string.IsNullOrWhiteSpace(det.Id.DetectorName)) { det = new AnalysisDefs.Detector(); CentralizedState.App.Logger(LMLoggers.AppSection.App).TraceEvent(LogLevels.Warning, 32444, "Detector " + curdet + " is not defined in the database"); } if (det.ListMode) det.MultiplicityParams.FA = acq.lm.FADefault; }