CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

SiPixelCalibDigi Class Reference

#include <SiPixelCalibDigi.h>

List of all members.

Classes

struct  datacontainer

Public Member Functions

uint16_t col () const
void fill (uint32_t ipoint, uint32_t adcval)
uint32_t getnentries (uint32_t ipoint) const
std::vector< uint8_t > getnentries () const
uint32_t getnpoints () const
uint32_t getsum (uint32_t ipoint) const
std::vector< uint32_t > getsum () const
uint32_t getsumsquares (uint32_t ipoint) const
std::vector< uint32_t > getsumsquares () const
void init (uint16_t row, uint16_t col, uint16_t npoints)
void reset ()
uint16_t row () const
std::pair< uint16_t, uint16_t > row_and_col () const
void setrowcol (uint16_t row, uint16_t col)
 SiPixelCalibDigi ()
 SiPixelCalibDigi (int packed_value, uint16_t row, uint16_t col)
 SiPixelCalibDigi (int packed_value)
virtual ~SiPixelCalibDigi ()

Private Attributes

std::vector< datacontainerm_data
std::pair< uint16_t, uint16_t > m_row_and_column

Detailed Description

Definition at line 9 of file SiPixelCalibDigi.h.


Constructor & Destructor Documentation

SiPixelCalibDigi::SiPixelCalibDigi ( int  packed_value,
uint16_t  row,
uint16_t  col 
) [inline]

Definition at line 12 of file SiPixelCalibDigi.h.

References reset().

:m_data(packed_value),m_row_and_column(row,col) {reset();}
SiPixelCalibDigi::SiPixelCalibDigi ( int  packed_value) [inline]

Definition at line 13 of file SiPixelCalibDigi.h.

References reset().

:m_data(packed_value),m_row_and_column(0,0){reset();}
SiPixelCalibDigi::SiPixelCalibDigi ( ) [inline]

Definition at line 14 of file SiPixelCalibDigi.h.

virtual SiPixelCalibDigi::~SiPixelCalibDigi ( ) [inline, virtual]

Definition at line 15 of file SiPixelCalibDigi.h.

{;}

Member Function Documentation

uint16_t SiPixelCalibDigi::col ( ) const [inline]

Definition at line 31 of file SiPixelCalibDigi.h.

References m_row_and_column.

Referenced by operator<<(), and setrowcol().

{return m_row_and_column.second;}
void SiPixelCalibDigi::fill ( uint32_t  ipoint,
uint32_t  adcval 
)

Definition at line 23 of file SiPixelCalibDigi.cc.

References plotBeamSpotDB::ipoint, and m_data.

                                                            {
  if(ipoint>=m_data.size())
    return;
  m_data[ipoint].nentries++;
  m_data[ipoint].adccountsum+=adcval;
  m_data[ipoint].adccountsumsq+=adcval*adcval;
  return;
}
uint32_t SiPixelCalibDigi::getnentries ( uint32_t  ipoint) const [inline]

Definition at line 26 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

{ return m_data[ipoint].nentries;}// returns the number of entries made for calibration point ipoint
std::vector< uint8_t > SiPixelCalibDigi::getnentries ( ) const

Definition at line 37 of file SiPixelCalibDigi.cc.

References m_data, and query::result.

                                                      {
  std::vector<uint8_t> result(0);
  for(uint32_t ii=0; ii<m_data.size();++ii)
    result.push_back(m_data[ii].nentries);
  return result;
}
uint32_t SiPixelCalibDigi::getnpoints ( ) const [inline]

Definition at line 23 of file SiPixelCalibDigi.h.

References m_data.

Referenced by operator<(), and operator<<().

{return m_data.size();} // returns the number of calibration points
std::vector< uint32_t > SiPixelCalibDigi::getsum ( ) const

Definition at line 44 of file SiPixelCalibDigi.cc.

References m_data, and query::result.

                                                  {
  std::vector<uint32_t> result(0);
  for(uint32_t ii=0; ii<m_data.size();++ii)
    result.push_back(m_data[ii].adccountsum);
  return result;
}
uint32_t SiPixelCalibDigi::getsum ( uint32_t  ipoint) const [inline]

Definition at line 24 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

{ return m_data[ipoint].adccountsum;}// returns the sum of adc counts for the collected events at point ipoint
std::vector< uint32_t > SiPixelCalibDigi::getsumsquares ( ) const

Definition at line 51 of file SiPixelCalibDigi.cc.

References m_data, and query::result.

                                                         {
  std::vector<uint32_t> result(0);
  for(uint32_t ii=0; ii<m_data.size();++ii)
    result.push_back(m_data[ii].adccountsumsq);
  return result;
}
uint32_t SiPixelCalibDigi::getsumsquares ( uint32_t  ipoint) const [inline]

Definition at line 25 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

{ return m_data[ipoint].adccountsumsq;}// returns the sum of the squares of adc counts for the collected events at point ipoint
void SiPixelCalibDigi::init ( uint16_t  row,
uint16_t  col,
uint16_t  npoints 
)

Definition at line 9 of file SiPixelCalibDigi.cc.

References reset(), and setrowcol().

                                                                         {
  setrowcol(row,col);
  reset();
  // expand if size of arrays has changed.... not implemented yet...
}
void SiPixelCalibDigi::reset ( void  )

Definition at line 15 of file SiPixelCalibDigi.cc.

References m_data.

Referenced by init(), and SiPixelCalibDigi().

                            {
  for(uint32_t iter =0; iter<m_data.size();++iter){
    m_data[iter].nentries=0;
    m_data[iter].adccountsum=0;
    m_data[iter].adccountsumsq=0;
  }
}
uint16_t SiPixelCalibDigi::row ( ) const [inline]

Definition at line 30 of file SiPixelCalibDigi.h.

References m_row_and_column.

Referenced by operator<<(), and setrowcol().

{return m_row_and_column.first;}
std::pair<uint16_t,uint16_t> SiPixelCalibDigi::row_and_col ( ) const [inline]

Definition at line 32 of file SiPixelCalibDigi.h.

References m_row_and_column.

{return m_row_and_column;}
void SiPixelCalibDigi::setrowcol ( uint16_t  row,
uint16_t  col 
)

Definition at line 32 of file SiPixelCalibDigi.cc.

References col(), m_row_and_column, and row().

Referenced by SiPixelCalibDigiProducer::fillPixel(), and init().


Member Data Documentation

std::vector<datacontainer> SiPixelCalibDigi::m_data [private]

Definition at line 44 of file SiPixelCalibDigi.h.

Referenced by fill(), getnentries(), getnpoints(), getsum(), getsumsquares(), and reset().

std::pair<uint16_t,uint16_t> SiPixelCalibDigi::m_row_and_column [private]

Definition at line 45 of file SiPixelCalibDigi.h.

Referenced by col(), row(), row_and_col(), and setrowcol().