public void Add(TOF t) { if (!initialised) { // the first TOF to be added defines the parameters gateStartTime = t.GateStartTime; clockPeriod = t.ClockPeriod; calibration = t.Calibration; stats = new RunningStatistics[t.Length]; for (int i = 0; i < Length; i++) { stats[i] = new RunningStatistics(); } initialised = true; } // add the TOF data - very minimal error checking: just check the lengths if (t.Length == Length) { for (int i = 0; i < Length; i++) { stats[i].Push(t.Data[i]); } } else { throw new TOFAccumulatorException(); } }
public void Add(TOF t) { if (!initialised) { // the first TOF to be added defines the parameters gateStartTime = t.GateStartTime; clockPeriod = t.ClockPeriod; calibration = t.Calibration; stats = new RunningStatistics[t.Length]; for (int i = 0; i < Length; i++) stats[i] = new RunningStatistics(); initialised = true; } // add the TOF data - very minimal error checking: just check the lengths if (t.Length == Length) for (int i = 0; i < Length; i++) stats[i].Push(t.Data[i]); else throw new TOFAccumulatorException(); }