Public Member Functions | Private Attributes | List of all members
WireCell::SimpleTrace Class Reference

#include <SimpleTrace.h>

Inheritance diagram for WireCell::SimpleTrace:
WireCell::ITrace WireCell::IData< ITrace >

Public Member Functions

 SimpleTrace (int chid, int tbin, const ChargeSequence &charge)
 
 SimpleTrace (int chid, int tbin, size_t ncharges)
 
ChargeSequencecharge ()
 
virtual int channel () const
 
virtual int tbin () const
 
virtual const ChargeSequencecharge () const
 
- Public Member Functions inherited from WireCell::ITrace
virtual ~ITrace ()
 
- Public Member Functions inherited from WireCell::IData< ITrace >
virtual ~IData ()
 

Private Attributes

int m_chid
 
int m_tbin
 
ChargeSequence m_charge
 

Additional Inherited Members

- Public Types inherited from WireCell::ITrace
typedef std::vector< float > ChargeSequence
 Sequential collection of charge. More...
 
- Public Types inherited from WireCell::IData< ITrace >
typedef ITrace value_type
 
typedef std::shared_ptr< const ITracepointer
 
typedef std::vector< pointervector
 
typedef std::shared_ptr< const vectorshared_vector
 

Detailed Description

This concrete trace is filled by time bin and charge.

It provides the results of the filling such that the ChargeSequence is trivially (exactly) zero suppressed but only at the ends. Any zeros bounded by non-zero charge are kept.

Definition at line 17 of file SimpleTrace.h.

Constructor & Destructor Documentation

SimpleTrace::SimpleTrace ( int  chid,
int  tbin,
const ChargeSequence charge 
)

Definition at line 5 of file SimpleTrace.cxx.

6  : m_chid(chid), m_tbin(tbin), m_charge(charge)
7 {
8 }
virtual int tbin() const
Definition: SimpleTrace.cxx:19
ChargeSequence & charge()
Definition: SimpleTrace.h:26
ChargeSequence m_charge
Definition: SimpleTrace.h:20
SimpleTrace::SimpleTrace ( int  chid,
int  tbin,
size_t  ncharges 
)

Definition at line 9 of file SimpleTrace.cxx.

10  : m_chid(chid), m_tbin(tbin), m_charge(ncharges, 0.0)
11 {
12 }
virtual int tbin() const
Definition: SimpleTrace.cxx:19
ChargeSequence m_charge
Definition: SimpleTrace.h:20

Member Function Documentation

int SimpleTrace::channel ( ) const
virtual

Return the identifier number for the channel on which this trace was recorded.

Implements WireCell::ITrace.

Definition at line 14 of file SimpleTrace.cxx.

15 {
16  return m_chid;
17 }
ChargeSequence& WireCell::SimpleTrace::charge ( )
inline

Definition at line 26 of file SimpleTrace.h.

26 { return m_charge; }
ChargeSequence m_charge
Definition: SimpleTrace.h:20
const ITrace::ChargeSequence & SimpleTrace::charge ( ) const
virtual

Return the contiguous adc/charge measurements on the channel starting at tbin.

Implements WireCell::ITrace.

Definition at line 24 of file SimpleTrace.cxx.

25 {
26  return m_charge;
27 }
ChargeSequence m_charge
Definition: SimpleTrace.h:20
int SimpleTrace::tbin ( ) const
virtual

Return the time bin relative to some absolute time (typically the start of the frame) at which the first ADC/charge in the trace was digitized (leading bin edge).

Implements WireCell::ITrace.

Definition at line 19 of file SimpleTrace.cxx.

20 {
21  return m_tbin;
22 }

Member Data Documentation

ChargeSequence WireCell::SimpleTrace::m_charge
private

Definition at line 20 of file SimpleTrace.h.

int WireCell::SimpleTrace::m_chid
private

Definition at line 18 of file SimpleTrace.h.

int WireCell::SimpleTrace::m_tbin
private

Definition at line 19 of file SimpleTrace.h.


The documentation for this class was generated from the following files: