Class to store ADC counts during clustering. More...
#include <SiPixelArrayBuffer.h>
Public Member Functions | |
int | columns () const |
int | index (int row, int col) const |
Definition of indexing within the buffer. | |
int | index (const SiPixelCluster::PixelPos &pix) const |
bool | inside (int row, int col) const |
int | operator() (const SiPixelCluster::PixelPos &) const |
int | operator() (int row, int col) const |
int | rows () const |
void | set_adc (int row, int col, int adc) |
void | set_adc (const SiPixelCluster::PixelPos &, int adc) |
void | setSize (int rows, int cols) |
SiPixelArrayBuffer (int rows, int cols) | |
SiPixelArrayBuffer () | |
int | size () const |
Private Attributes | |
int | ncols |
int | nrows |
std::vector< int > | pixel_vec |
Class to store ADC counts during clustering.
This class defines the buffer where the pixel ADC are stored. The size is the number of rows and cols into a ROC and it is set in the PixelThresholdClusterizer
TO DO: the chip size should be obtained in some better way.
History: Modify the indexing to col*nrows + row. 9/01 d.k. Add setSize method to adjust array size. 3/02 d.k.
Definition at line 27 of file SiPixelArrayBuffer.h.
SiPixelArrayBuffer::SiPixelArrayBuffer | ( | int | rows, |
int | cols | ||
) | [inline] |
Definition at line 56 of file SiPixelArrayBuffer.h.
SiPixelArrayBuffer::SiPixelArrayBuffer | ( | ) | [inline] |
Definition at line 31 of file SiPixelArrayBuffer.h.
{}
int SiPixelArrayBuffer::columns | ( | ) | const [inline] |
int SiPixelArrayBuffer::index | ( | int | row, |
int | col | ||
) | const [inline] |
Definition of indexing within the buffer.
Definition at line 45 of file SiPixelArrayBuffer.h.
References nrows.
Referenced by operator()(), and set_adc().
int SiPixelArrayBuffer::index | ( | const SiPixelCluster::PixelPos & | pix | ) | const [inline] |
Definition at line 46 of file SiPixelArrayBuffer.h.
References SiPixelCluster::PixelPos::col(), index(), and SiPixelCluster::PixelPos::row().
Referenced by index().
bool SiPixelArrayBuffer::inside | ( | int | row, |
int | col | ||
) | const [inline] |
int SiPixelArrayBuffer::operator() | ( | int | row, |
int | col | ||
) | const [inline] |
int SiPixelArrayBuffer::operator() | ( | const SiPixelCluster::PixelPos & | pix | ) | const [inline] |
Definition at line 102 of file SiPixelArrayBuffer.h.
References SiPixelCluster::PixelPos::col(), index(), inside(), pixel_vec, and SiPixelCluster::PixelPos::row().
int SiPixelArrayBuffer::rows | ( | ) | const [inline] |
Definition at line 36 of file SiPixelArrayBuffer.h.
References nrows.
Referenced by setSize().
{ return nrows;}
void SiPixelArrayBuffer::set_adc | ( | const SiPixelCluster::PixelPos & | pix, |
int | adc | ||
) | [inline] |
Definition at line 116 of file SiPixelArrayBuffer.h.
References ecalMGPA::adc(), index(), and pixel_vec.
void SiPixelArrayBuffer::set_adc | ( | int | row, |
int | col, | ||
int | adc | ||
) | [inline] |
Definition at line 110 of file SiPixelArrayBuffer.h.
References ecalMGPA::adc(), index(), and pixel_vec.
void SiPixelArrayBuffer::setSize | ( | int | rows, |
int | cols | ||
) | [inline] |
Definition at line 71 of file SiPixelArrayBuffer.h.
References i, ncols, nrows, pixel_vec, and rows().
{ nrows = rows; ncols = cols; pixel_vec.resize(rows*cols); //std::cout << " Resize the clusterize pixel buffer " << (rows*cols) // << std::endl; // TO DO: check this now: // Some STL implementations have problems with default values // so a initialization loop is used instead std::vector<int>::iterator i=pixel_vec.begin(), iend=pixel_vec.end(); for ( ; i!=iend; ++i) { *i = 0; } }
int SiPixelArrayBuffer::size | ( | void | ) | const [inline] |
Definition at line 42 of file SiPixelArrayBuffer.h.
References pixel_vec.
{ return pixel_vec.size();}
int SiPixelArrayBuffer::ncols [private] |
Definition at line 50 of file SiPixelArrayBuffer.h.
int SiPixelArrayBuffer::nrows [private] |
Definition at line 49 of file SiPixelArrayBuffer.h.
std::vector<int> SiPixelArrayBuffer::pixel_vec [private] |
Definition at line 51 of file SiPixelArrayBuffer.h.
Referenced by operator()(), set_adc(), setSize(), SiPixelArrayBuffer(), and size().