SimpleTrace.h
Go to the documentation of this file.
1 #ifndef WIRECELL_SIMPLETRACE
2 #define WIRECELL_SIMPLETRACE
3 
4 #include "WireCellIface/ITrace.h"
5 
6 #include <map>
7 #include <vector>
8 
9 namespace WireCell {
10 
11  /** This concrete trace is filled by time bin and charge.
12  *
13  * It provides the results of the filling such that the ChargeSequence
14  * is trivially (exactly) zero suppressed but only at the ends. Any
15  * zeros bounded by non-zero charge are kept.
16  */
17  class SimpleTrace : public ITrace {
18  int m_chid;
19  int m_tbin;
21  public:
22  SimpleTrace(int chid, int tbin, const ChargeSequence& charge);
23  SimpleTrace(int chid, int tbin, size_t ncharges);
24 
25  // while someone has me as a concrete object they can modify.
27 
28  // ITrace interface:
29 
30  virtual int channel() const;
31 
32  virtual int tbin() const;
33 
34  virtual const ChargeSequence& charge() const;
35  };
36 
37 
38 
39 }
40 
41 #endif
42 
43 
44 // Local Variables:
45 // mode: c++
46 // c-basic-offset: 4
47 // End:
SimpleTrace(int chid, int tbin, const ChargeSequence &charge)
Definition: SimpleTrace.cxx:5
virtual int channel() const
Definition: SimpleTrace.cxx:14
virtual int tbin() const
Definition: SimpleTrace.cxx:19
Definition: Main.h:22
ChargeSequence & charge()
Definition: SimpleTrace.h:26
ChargeSequence m_charge
Definition: SimpleTrace.h:20
std::vector< float > ChargeSequence
Sequential collection of charge.
Definition: ITrace.h:21