29 size_t chanSize = other.waveSize(0);
32 assert (chanSize == other.waveSize(which));
33 for (
unsigned int tbin = 0; tbin < chanSize; tbin++)
35 other.wave(which, tbin));
71 for (
size_t j = oldsz+1; j < sz+1; j++)
87 std::vector<float> tmp_data (
m_data);
90 std::vector<int> tmp_slots (
m_slots);
106 if (sz == cursz)
return;
108 for (
size_t j = febIndex+1; j <
m_indices.size(); j++)
128 const float* beg =
nullptr;
129 const float*
end =
nullptr;
132 const float* chanstart = &
m_data[slot *
nWaves * nsamp];
133 beg = chanstart + which * nsamp;
204 std::copy (from.begin(), from.end(),
Per-channel class holding wave information in time bins.
A more compact way of storing shape/ofc data.
Per-channel class holding wave information in time bins.
static const unsigned int nWaves
The number of different types of waves we store.
LArCompactSubsetVector * m_subset_nc
Subset within which we live (non-const). Null for an invalid proxy.
void assign(const LAr2DWaveBase &other)
Initialize the referenced data from a standalone object.
unsigned int m_chan
Channel index to which we're referring.
std::vector< int > m_slots
Map from channel indices to wave slots.
float timeBinWidth(unsigned int chan) const
Return the time bin width for channel index CHAN.
float m_timeOffset
Time parameters.
void shrink_to_fit()
Release any allocated but unused storage.
std::vector< float > m_data
The wave data.
void resize(size_t sz)
Change the size of the vector.
void setData(unsigned int which, unsigned int chan, size_t tbin, size_t chanSize, const LArVectorProxy &from)
Set wave data for a channel.
unsigned int m_chanSize
Number of time bins per channels. 0 before any waves have been added.
std::vector< FebId > m_febids
Vector of stored FebIds.
std::vector< unsigned int > m_indices
Map from FEB indices to channel indices.
void resizeChanVec(size_t febIndex, size_t sz)
Resize one channel vector.
iterator end()
End iterator.
float timeOffset(unsigned int chan) const
Return the time offset for channel index CHAN.
static const unsigned int nWaves
Number of wave types we store.
LArVectorProxy getData(unsigned int which, unsigned int chan, size_t tbin) const
Retrieve wave data.
unsigned int m_nSamples
Number of samples per wave. 0 before any waves have been added.
void setTimings(unsigned int chan, float timeOffset, float timeBinWidth)
Set timing information for a channel.
LArCompactSubsetVector(size_t nfeb=0)
Constructor.
Proxy for accessing a range of float values like a vector.