private void AddDetectorData() { MOE.Common.Models.Repositories.IControllerEventLogRepository repository = MOE.Common.Models.Repositories.ControllerEventLogRepositoryFactory.Create(); var detectors = Approach.GetDetectorsForMetricType(11); List <Models.Controller_Event_Log> detectorActivations = new List <Models.Controller_Event_Log>(); foreach (var d in detectors) { detectorActivations.AddRange(repository.GetEventsByEventCodesParam(Approach.SignalID, this.StartTime, this.EndTime, new List <int> { 82 }, d.DetChannel)); } this.totalVolume = detectorActivations.Count; foreach (RLMCycle cycle in rlmCycleCollection) { var events = detectorActivations.Where(d => d.Timestamp >= cycle.StartTime && d.Timestamp < cycle.EndTime); foreach (var cve in events) { RLMDetectorDataPoint ddp = new RLMDetectorDataPoint(cycle.StartTime, cve.Timestamp); cycle.AddDetector(ddp); } } }
public void AddDetector(RLMDetectorDataPoint ddp) { DetectorCollection.Add(ddp); }