81#ifndef LARRAWCONDITIONS_LARCOMPACTSUBSET_H
82#define LARRAWCONDITIONS_LARCOMPACTSUBSET_H
245 operator bool()
const;
858 void setData (
unsigned int which,
872 template <
class T,
class OTHERIT,
class COPIER>
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Per-channel class holding wave information in time bins.
LArCompactSubsetChannelPointer(const LArCompactSubsetChannelProxy *p)
Constructor.
LArCompactSubsetChannelProxy operator*() const
‘Dereference’ the pointer.
A more compact way of storing shape/ofc data — non-const portion.
LArCompactSubsetVector * m_subset_nc
Subset within which we live (non-const). Null for an invalid proxy.
LArCompactSubsetChannelProxy & operator=(const LAr2DWaveBase &other)
Initialize the referenced data from a standalone object.
LArCompactSubsetChannelProxy()
Default constructor.
LArCompactSubsetChannelProxy(unsigned int chan, LArCompactSubsetVector &subset)
Constructor.
void assign(const LAr2DWaveBase &other)
Initialize the referenced data from a standalone object.
LArCompactSubsetChannelVectorPointer()
Default constructor.
const LArCompactSubsetChannelVector * operator->() const
‘Dereference’ the pointer.
LArCompactSubsetChannelVector operator*()
‘Dereference’ the pointer.
LArCompactSubsetChannelVectorPointer(const LArCompactSubsetChannelVector *p)
Constructor.
LArCompactSubsetConstChannelVector operator*() const
‘Dereference’ the pointer.
Iterator for LArCompactSubsetChannelVector.
const_iterator operator-(size_t delta) const
Adjust iterator backwards.
bool operator!=(const const_iterator &other) const
Iterator inequality test.
const_iterator & operator++()
Iterator increment.
const_iterator()
Default constructor.
unsigned int m_chan
Channel index at which we're currently pointing.
LArCompactSubsetConstChannelProxy operator*() const
Iterator dereference.
const_iterator(unsigned int chan, const LArCompactSubsetVector &subset)
Constructor from channel index and subset reference.
bool operator==(const const_iterator &other) const
Iterator equality test.
const LArCompactSubsetVector * m_subset
Subset within which we live.
This acts like a vector of channel objects.
size_t size() const
Return the size of this vector (number of channels for this FEB).
const_iterator end() const
End iterator.
LArCompactSubsetVector * m_subset
The subset within which we live.
size_t m_febIndex
The index of the FEB with which this vector is associated.
LArCompactSubsetChannelProxy operator[](size_t i)
Vector indexing.
LArCompactSubsetChannelVector(size_t febIndex, LArCompactSubsetVector *subset)
Constructor.
const_iterator iterator
No separate non-const iterator.
const_iterator begin() const
Begin iterator.
void resize(size_t sz)
Resize this vector.
A more compact way of storing shape/ofc data — const portion.
size_t getSize() const
Return the number of time bins for this channel.
unsigned int m_chan
Channel index to which we're referring.
LArCompactSubsetConstChannelProxy(unsigned int chan, const LArCompactSubsetVector &subset)
Constructor.
LArCompactSubsetConstChannelProxy()
Default constructor.
float timeBinWidth() const
Return the time bin width for this channel.
ILArOFC::OFCRef_t OFC_b(size_t tbin) const
ILArShape::ShapeRef_t shapeDer(size_t tbin) const
ILArShape::ShapeRef_t shape(size_t tbin) const
bool isValid() const
Test to see if the proxy is valid.
const LArCompactSubsetVector * m_subset
Subset within which we live. Null for an invalid proxy.
size_t shapeDerSize() const
float timeOffset() const
Return the time offset for this channel.
LArVectorProxy getData(unsigned int which, size_t tbin) const
Return one set of wave data from this channel.
ILArOFC::OFCRef_t OFC_a(size_t tbin) const
This acts like a vector of channel objects — const version.
const LArCompactSubsetVector * m_subset
The subset within which we live.
LArCompactSubsetConstChannelProxy operator[](size_t i) const
Vector indexing.
LArCompactSubsetConstChannelVector(size_t febIndex, const LArCompactSubsetVector *subset)
Constructor.
size_t m_febIndex
The index of the FEB with which this vector is associated.
size_t size() const
Return the size of this vector (number of channels for this FEB).
This acts like a FEB ID/channel vector pair.
LArCompactSubsetConstChannelVector second
LArCompactSubsetConstFebPair(size_t febIndex, const LArCompactSubsetVector &subset)
Constructor.
This acts like a FEB ID/channel vector pair.
LArCompactSubsetFebPair(size_t febIndex, LArCompactSubsetVector &subset)
Constructor.
LArCompactSubsetChannelVector second
bool operator!=(const const_iterator &other) const
Compare iterators for inequality.
const_iterator operator+(size_t delta) const
Adjust iterator.
const_iterator & operator++()
Advance iterator.
size_t m_febIndex
Index we're currently referencing.
const LArCompactSubsetVector & m_subset
The subset within which we live.
difference_type operator-(const const_iterator &other) const
Iterator difference.
LArCompactSubsetConstFebPair operator*()
‘Dereference’ the iterator.
bool operator==(const const_iterator &other) const
Compare iterators for equality.
const_iterator(size_t febIndex, const LArCompactSubsetVector &subset)
Constructor.
LArCompactSubsetVector & m_subset
The subset within which we live.
iterator(size_t febIndex, LArCompactSubsetVector &subset)
Constructor.
iterator operator+(size_t delta)
Adjust iterator.
bool operator==(const iterator &other) const
Compare iterators for equality.
bool operator!=(const iterator &other) const
Compare iterators for inequality.
size_t m_febIndex
Index we're currently referencing.
difference_type operator-(const iterator &other)
Iterator difference.
iterator & operator++()
Advance iterator.
LArCompactSubsetFebPair operator*()
‘Dereference’ the iterator.
This acts like a vector of FEB ID / channel vector pairs.
unsigned int FebId
Type for FEB IDs. Would be better to get this from somewhere common...
size_t febSize(unsigned int febIndex) const
Return the number of channels for a given FEB index.
size_t getSize(unsigned int chan) const
Return the number of time bins for channel index CHAN.
std::vector< int > m_slots
Map from channel indices to wave slots.
size_t size() const
Return the size of this vector.
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.
unsigned int chanIndex(unsigned int febIndex) const
Return the index of the first channel for a FEB index.
const_iterator end() const
End iterator.
std::vector< float > m_data
The wave data.
void resize(size_t sz)
Change the size of the vector.
const_iterator begin() const
Begin iterator.
size_t getChanSize() const
Return the number of time bins used in this subset.
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.
iterator begin()
Begin iterator.
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.
LArCompactSubsetFebPair operator[](size_t i)
Vector indexing.
static const unsigned int nWaves
Number of wave types we store.
FebId & febIdRef(size_t febIndex)
Return a reference to a FEB ID variable.
const FebId & febIdRef(size_t febIndex) const
Return a reference to a FEB ID variable.
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.
static void copySubset(OTHERIT otherBeg, OTHERIT otherEnd, LArCompactSubsetVector &to, COPIER copier)
Helper used by LArConditionsSubset::assign.
Proxy for accessing a range of float values like a vector.