ATLAS Offline Software
|
This acts like a vector of FEB ID / channel vector pairs. More...
#include <LArCompactSubset.h>
Classes | |
class | const_iterator |
const_iterator class. More... | |
class | iterator |
Iterator class. More... | |
Public Types | |
typedef unsigned int | FebId |
Type for FEB IDs. Would be better to get this from somewhere common... More... | |
Public Member Functions | |
LArCompactSubsetVector (size_t nfeb=0) | |
Constructor. More... | |
size_t | size () const |
Return the size of this vector. More... | |
LArCompactSubsetFebPair | operator[] (size_t i) |
Vector indexing. More... | |
const LArCompactSubsetConstFebPair | operator[] (size_t i) const |
Vector indexing. More... | |
iterator | begin () |
Begin iterator. More... | |
iterator | end () |
End iterator. More... | |
const_iterator | begin () const |
Begin iterator. More... | |
const_iterator | end () const |
End iterator. More... | |
void | resize (size_t sz) |
Change the size of the vector. More... | |
void | shrink_to_fit () |
Release any allocated but unused storage. More... | |
FebId & | febIdRef (size_t febIndex) |
Return a reference to a FEB ID variable. More... | |
const FebId & | febIdRef (size_t febIndex) const |
Return a reference to a FEB ID variable. More... | |
size_t | febSize (unsigned int febIndex) const |
Return the number of channels for a given FEB index. More... | |
unsigned int | chanIndex (unsigned int febIndex) const |
Return the index of the first channel for a FEB index. More... | |
void | resizeChanVec (size_t febIndex, size_t sz) |
Resize one channel vector. More... | |
size_t | getChanSize () const |
Return the number of time bins used in this subset. More... | |
size_t | getSize (unsigned int chan) const |
Return the number of time bins for channel index CHAN. More... | |
float | timeOffset (unsigned int chan) const |
Return the time offset for channel index CHAN. More... | |
float | timeBinWidth (unsigned int chan) const |
Return the time bin width for channel index CHAN. More... | |
LArVectorProxy | getData (unsigned int which, unsigned int chan, size_t tbin) const |
Retrieve wave data. More... | |
void | setTimings (unsigned int chan, float timeOffset, float timeBinWidth) |
Set timing information for a channel. More... | |
void | setData (unsigned int which, unsigned int chan, size_t tbin, size_t chanSize, const LArVectorProxy &from) |
Set wave data for a channel. More... | |
Static Public Member Functions | |
template<class T , class OTHERIT , class COPIER > | |
static void | copySubset (OTHERIT otherBeg, OTHERIT otherEnd, LArCompactSubsetVector &to, COPIER copier) |
Helper used by LArConditionsSubset::assign. More... | |
Static Public Attributes | |
static const unsigned int | nWaves = 2 |
Number of wave types we store. More... | |
Private Attributes | |
unsigned int | m_chanSize |
Number of time bins per channels. 0 before any waves have been added. More... | |
unsigned int | m_nSamples |
Number of samples per wave. 0 before any waves have been added. More... | |
float | m_timeOffset |
Time parameters. More... | |
float | m_timeBinWidth |
std::vector< FebId > | m_febids |
Vector of stored FebIds. More... | |
std::vector< unsigned int > | m_indices |
Map from FEB indices to channel indices. More... | |
std::vector< int > | m_slots |
Map from channel indices to wave slots. More... | |
std::vector< float > | m_data |
The wave data. More... | |
This acts like a vector of FEB ID / channel vector pairs.
This is also the class which contains all the data.
Definition at line 529 of file LArCompactSubset.h.
typedef unsigned int LArCompactSubsetVector::FebId |
Type for FEB IDs. Would be better to get this from somewhere common...
Definition at line 536 of file LArCompactSubset.h.
LArCompactSubsetVector::LArCompactSubsetVector | ( | size_t | nfeb = 0 | ) |
Constructor.
nfeb | Initial number of FEBs to allocate. |
Definition at line 47 of file LArCompactSubset.cxx.
iterator LArCompactSubsetVector::begin | ( | ) |
Begin iterator.
const_iterator LArCompactSubsetVector::begin | ( | ) | const |
Begin iterator.
unsigned int LArCompactSubsetVector::chanIndex | ( | unsigned int | febIndex | ) | const |
Return the index of the first channel for a FEB index.
febIndex | The index of the FEB to query. |
If febIndex is the number of FEBs, then this returns the total number of channels.
|
static |
Helper used by LArConditionsSubset::assign.
otherBeg | Start of the range to copy. |
otherEnd | End of the range to copy. |
to | The subset to which to copy. |
copier | Helper to copy a single payload object. |
iterator LArCompactSubsetVector::end | ( | ) |
End iterator.
const_iterator LArCompactSubsetVector::end | ( | ) | const |
End iterator.
FebId& LArCompactSubsetVector::febIdRef | ( | size_t | febIndex | ) |
Return a reference to a FEB ID variable.
febIndex | Index of the desired FEB ID. |
Return a reference to a FEB ID variable.
febIndex | Index of the desired FEB ID. |
size_t LArCompactSubsetVector::febSize | ( | unsigned int | febIndex | ) | const |
Return the number of channels for a given FEB index.
febIndex | The index of the FEB to query. |
size_t LArCompactSubsetVector::getChanSize | ( | ) | const |
Return the number of time bins used in this subset.
LArVectorProxy LArCompactSubsetVector::getData | ( | unsigned int | which, |
unsigned int | chan, | ||
size_t | tbin | ||
) | const |
Retrieve wave data.
which | The wave type to retrieve. |
chan | The index of the channel to retrieve. |
tbin | The time bin index to retrieve. |
Definition at line 122 of file LArCompactSubset.cxx.
size_t LArCompactSubsetVector::getSize | ( | unsigned int | chan | ) | const |
Return the number of time bins for channel index CHAN.
chan | The channel index to query. |
This is either the same as getChanSize(), or 0 if this channel is empty.
LArCompactSubsetFebPair LArCompactSubsetVector::operator[] | ( | size_t | i | ) |
Vector indexing.
i | Index to look up. |
const LArCompactSubsetConstFebPair LArCompactSubsetVector::operator[] | ( | size_t | i | ) | const |
Vector indexing.
i | Index to look up. |
void LArCompactSubsetVector::resize | ( | size_t | sz | ) |
Change the size of the vector.
sz | New size. |
Restriction: The size can only be increased.
Definition at line 64 of file LArCompactSubset.cxx.
void LArCompactSubsetVector::resizeChanVec | ( | size_t | febIndex, |
size_t | sz | ||
) |
Resize one channel vector.
febIndex | The index of the vector to resize. |
sz | The new size of the vector. |
Restriction: Only the last index may be resized.
Definition at line 102 of file LArCompactSubset.cxx.
void LArCompactSubsetVector::setData | ( | unsigned int | which, |
unsigned int | chan, | ||
size_t | tbin, | ||
size_t | chanSize, | ||
const LArVectorProxy & | from | ||
) |
Set wave data for a channel.
which | Wave type to set. |
chan | Channel index to set. |
tbin | Time bin index to set. |
chanSize | Number of time bins for this channel. |
from | Wave data. |
We currently assume that all non-empty channels within a subset have the same number of time bins and samples. We'll trip an assertion if that's not the case.
Definition at line 177 of file LArCompactSubset.cxx.
void LArCompactSubsetVector::setTimings | ( | unsigned int | chan, |
float | timeOffset, | ||
float | timeBinWidth | ||
) |
Set timing information for a channel.
chan | Channel index to set. |
timeOffset | Time offset to set. |
timeBinWidth | Time bin width to set. |
We currently assume that all non-empty channels within a subset have the same values for these parameters. We'll trip an assertion if that's not the case.
Definition at line 150 of file LArCompactSubset.cxx.
void LArCompactSubsetVector::shrink_to_fit | ( | ) |
Release any allocated but unused storage.
Called by the P->T converter after conversion is complete.
Definition at line 85 of file LArCompactSubset.cxx.
size_t LArCompactSubsetVector::size | ( | ) | const |
Return the size of this vector.
float LArCompactSubsetVector::timeBinWidth | ( | unsigned int | chan | ) | const |
Return the time bin width for channel index CHAN.
chan | The channel index to query. |
We currently assume that this is the same for all channels, so CHAN is ignored.
float LArCompactSubsetVector::timeOffset | ( | unsigned int | chan | ) | const |
Return the time offset for channel index CHAN.
chan | The channel index to query. |
We currently assume that this is the same for all channels, so CHAN is ignored.
|
private |
Number of time bins per channels. 0 before any waves have been added.
Definition at line 881 of file LArCompactSubset.h.
|
private |
The wave data.
Definition at line 910 of file LArCompactSubset.h.
|
private |
Vector of stored FebIds.
Definition at line 894 of file LArCompactSubset.h.
|
private |
Map from FEB indices to channel indices.
Definition at line 899 of file LArCompactSubset.h.
|
private |
Number of samples per wave. 0 before any waves have been added.
Definition at line 884 of file LArCompactSubset.h.
|
private |
Map from channel indices to wave slots.
Definition at line 905 of file LArCompactSubset.h.
|
private |
Definition at line 889 of file LArCompactSubset.h.
|
private |
Time parameters.
We assume that these are the same for all non-empty channels within a subset.
Definition at line 888 of file LArCompactSubset.h.
|
static |
Number of wave types we store.
Definition at line 533 of file LArCompactSubset.h.