ITrace.h
Go to the documentation of this file.
1 #ifndef WIRECELLIFACE_ITRACE
2 #define WIRECELLIFACE_ITRACE
3 
4 #include "WireCellIface/IData.h"
6 
7 #include <vector>
8 
9 namespace WireCell {
10 
11  /** Interface to charge vs time waveform signal on a channel.
12  *
13  * A trace is an ordered sequence of charge measurements in
14  * contiguous time bins.
15  */
16  class ITrace : public IData<ITrace>{
17  public:
18  /// Sequential collection of charge.
19  //
20  // fixme: should replace this with a Waveform::realseq_t
21  typedef std::vector<float> ChargeSequence;
22 
23  virtual ~ITrace() ;
24 
25  /// Return the identifier number for the channel on which this
26  /// trace was recorded.
27  virtual int channel() const = 0;
28 
29  /// Return the time bin relative to some absolute time
30  /// (typically the start of the frame) at which the first
31  /// ADC/charge in the trace was digitized (leading bin edge).
32  virtual int tbin() const = 0;
33 
34  /// Return the contiguous adc/charge measurements on the
35  /// channel starting at tbin.
36  virtual const ChargeSequence& charge() const = 0;
37  };
38 
39 }
40 
41 
42 #endif
virtual int tbin() const =0
virtual int channel() const =0
Definition: Main.h:22
virtual const ChargeSequence & charge() const =0
std::vector< float > ChargeSequence
Sequential collection of charge.
Definition: ITrace.h:21