/// <summary>
 /// Creates a new <see cref="ItemEventArgs"/> instance.
 /// </summary>
 /// <param name="sample">The involved <see cref="Sample"/>.</param>
 public SampleEventArgs(Sample sample)
 {
     m_Sample = sample;
 }
        protected internal virtual void OnNewSample(Sample newSample)
        {
            m_RawOutput.WriteOutput(newSample);

            TimeStampedValue<double> heartSignal = new TimeStampedValue<double>(newSample.TimeStamp, newSample.Heart);
            m_RawHeartSignal.WriteOutput(heartSignal);

            EventHandler<SampleEventArgs> handler = this.NewSample;
            if (handler != null)
            {
                try
                {
                    handler(this, new SampleEventArgs(newSample));
                }
                catch (Exception ex)
                {
                    Debug.WriteLine(ex.ToString());
                    //s_Log.Fatal("One of the subscribers of the NewSample event threw an exception.");
                }
            }
        }