Public Member Functions | Private Attributes | List of all members
wcls::LazyTrace Class Reference
Inheritance diagram for wcls::LazyTrace:

Public Member Functions

 LazyTrace (art::Handle< std::vector< raw::RawDigit > > rdvh, size_t index)
 
virtual int channel () const
 
virtual int tbin () const
 
virtual const ChargeSequence & charge () const
 

Private Attributes

art::Handle< std::vector< raw::RawDigit > > m_rdvh
 
size_t m_index
 
int m_channel
 
WireCell::ITrace::ChargeSequence m_charge
 

Detailed Description

Definition at line 17 of file LazyFrameSource.cxx.

Constructor & Destructor Documentation

wcls::LazyTrace::LazyTrace ( art::Handle< std::vector< raw::RawDigit > >  rdvh,
size_t  index 
)
inline

Definition at line 26 of file LazyFrameSource.cxx.

27  : m_rdvh(rdvh), m_index(index), m_channel(rdvh->at(index).Channel()) {}
art::Handle< std::vector< raw::RawDigit > > m_rdvh

Member Function Documentation

virtual int wcls::LazyTrace::channel ( ) const
inlinevirtual

Definition at line 30 of file LazyFrameSource.cxx.

30 { return m_channel; }
virtual const ChargeSequence& wcls::LazyTrace::charge ( ) const
inlinevirtual

Definition at line 33 of file LazyFrameSource.cxx.

33  {
34  if (m_charge.empty()) {
35  auto const& rd = m_rdvh->at(m_index);
36  const raw::RawDigit::ADCvector_t& adcv = rd.ADCs();
37  //std::cerr << "trace " << m_index << " chan " << m_channel << " with " << adcv.size() << " samples\n";
38  m_charge.insert(m_charge.end(), adcv.begin(), adcv.end());
39  m_rdvh.clear(); // bye bye
40  }
41  return m_charge;
42  }
WireCell::ITrace::ChargeSequence m_charge
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
Definition: RawDigit.h:73
art::Handle< std::vector< raw::RawDigit > > m_rdvh
void clear()
Definition: Handle.h:236
virtual int wcls::LazyTrace::tbin ( ) const
inlinevirtual

Definition at line 31 of file LazyFrameSource.cxx.

31 { return 0; }

Member Data Documentation

int wcls::LazyTrace::m_channel
private

Definition at line 20 of file LazyFrameSource.cxx.

WireCell::ITrace::ChargeSequence wcls::LazyTrace::m_charge
mutableprivate

Definition at line 22 of file LazyFrameSource.cxx.

size_t wcls::LazyTrace::m_index
private

Definition at line 19 of file LazyFrameSource.cxx.

art::Handle< std::vector<raw::RawDigit> > wcls::LazyTrace::m_rdvh
mutableprivate

Definition at line 18 of file LazyFrameSource.cxx.


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