ZSEndedTrace.h
Go to the documentation of this file.
1 #ifndef WIRECELL_ZSENDEDTRACE
2 #define WIRECELL_ZSENDEDTRACE
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 ZSEndedTrace : public ITrace {
19  std::map<int,float> m_chqmap;
21 public:
22  ZSEndedTrace(int chid, int nbins=0);
23 
24  /// used to fill.
25  void operator()(int tbin, float charge);
26 
27  virtual int channel() const;
28 
29  virtual int tbin() const;
30 
31  virtual const ChargeSequence& charge() const;
32 };
33 
34 
35 }
36 
37 #endif
virtual const ChargeSequence & charge() const
virtual int channel() const
virtual int tbin() const
void operator()(int tbin, float charge)
used to fill.
Definition: Main.h:22
ChargeSequence m_charge
Definition: ZSEndedTrace.h:20
ZSEndedTrace(int chid, int nbins=0)
Definition: ZSEndedTrace.cxx:6
std::vector< float > ChargeSequence
Sequential collection of charge.
Definition: ITrace.h:21
std::map< int, float > m_chqmap
Definition: ZSEndedTrace.h:19