27 const std::vector<std::vector<float> >& wave0,
28 const std::vector<std::vector<float> >& wave1)
53 unsigned int nSamples,
54 const std::vector<float>& wave0,
55 const std::vector<float>& wave1,
60 assert (
index + nPhases*nSamples <= wave0.size());
61 assert (
index + nPhases*nSamples <= wave1.size());
66 for (
unsigned int i = 0; i < nPhases; i++) {
68 wave0.begin() +
index + nSamples);
70 wave1.begin() +
index + nSamples);
82 if (!other.isValid()) {
90 size_t chanSize = other.getSize();
91 for (
unsigned int which = 0; which <
nWaves; ++which) {
92 m_waves[which].resize (chanSize);
93 for (
unsigned int i = 0; i < chanSize; i++) {
113 for (
unsigned int which = 0; which <
nWaves; ++which)
void swap(DataVector< T > &a, DataVector< T > &b)
See DataVector<T, BASE>::swap().
Per-channel class holding wave information in time bins.
A more compact way of storing shape/ofc data.
static const unsigned int nWaves
The number of different types of waves we store.
float timeBinWidth() const
Return the time bin width for this channel.
LAr2DWaveBase()
Default constructor.
float m_timeOffset
The time offset for this channel.
void setFrom(LAr2DWaveBase &other)
Assign from another wave object.
std::vector< std::vector< float > > m_waves[nWaves]
The wave data.
LArVectorProxy wave(unsigned int which, size_t tbin) const
Return wave data.
float timeOffset() const
Return the time offset for this channel.
float m_timeBinWidth
The time bin width for this channel.
A more compact way of storing shape/ofc data — const portion.
Proxy for accessing a range of float values like a vector.