CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
SiPixelCalibDigi Class Reference

#include <SiPixelCalibDigi.h>

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 (int packed_value, uint16_t row, uint16_t col)
 
 SiPixelCalibDigi (int packed_value)
 
 SiPixelCalibDigi ()
 
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() [1/3]

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

Definition at line 11 of file SiPixelCalibDigi.h.

References reset().

11  : m_data(packed_value), m_row_and_column(row, col) {
12  reset();
13  }
uint16_t row() const
std::pair< uint16_t, uint16_t > m_row_and_column
std::vector< datacontainer > m_data
uint16_t col() const

◆ SiPixelCalibDigi() [2/3]

SiPixelCalibDigi::SiPixelCalibDigi ( int  packed_value)
inline

Definition at line 14 of file SiPixelCalibDigi.h.

References reset().

14 : m_data(packed_value), m_row_and_column(0, 0) { reset(); }
std::pair< uint16_t, uint16_t > m_row_and_column
std::vector< datacontainer > m_data

◆ SiPixelCalibDigi() [3/3]

SiPixelCalibDigi::SiPixelCalibDigi ( )
inline

Definition at line 15 of file SiPixelCalibDigi.h.

15 : m_data(0), m_row_and_column(0, 0) { ; }
std::pair< uint16_t, uint16_t > m_row_and_column
std::vector< datacontainer > m_data

◆ ~SiPixelCalibDigi()

virtual SiPixelCalibDigi::~SiPixelCalibDigi ( )
inlinevirtual

Definition at line 16 of file SiPixelCalibDigi.h.

16 { ; }

Member Function Documentation

◆ col()

uint16_t SiPixelCalibDigi::col ( ) const
inline

Definition at line 38 of file SiPixelCalibDigi.h.

References m_row_and_column.

Referenced by python.rootplot.root2matplotlib.Hist2D::colz(), init(), operator<<(), and setrowcol().

38 { return m_row_and_column.second; }
std::pair< uint16_t, uint16_t > m_row_and_column

◆ fill()

void SiPixelCalibDigi::fill ( uint32_t  ipoint,
uint32_t  adcval 
)

Definition at line 23 of file SiPixelCalibDigi.cc.

References plotBeamSpotDB::ipoint, and m_data.

23  {
24  if (ipoint >= m_data.size())
25  return;
26  m_data[ipoint].nentries++;
27  m_data[ipoint].adccountsum += adcval;
28  m_data[ipoint].adccountsumsq += adcval * adcval;
29  return;
30 }
std::vector< datacontainer > m_data

◆ getnentries() [1/2]

uint32_t SiPixelCalibDigi::getnentries ( uint32_t  ipoint) const
inline

Definition at line 31 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

31  {
32  return m_data[ipoint].nentries;
33  } // returns the number of entries made for calibration point ipoint
std::vector< datacontainer > m_data

◆ getnentries() [2/2]

std::vector< uint8_t > SiPixelCalibDigi::getnentries ( ) const

Definition at line 37 of file SiPixelCalibDigi.cc.

References cuy::ii, m_data, and mps_fire::result.

37  {
38  std::vector<uint8_t> result(0);
39  for (uint32_t ii = 0; ii < m_data.size(); ++ii)
40  result.push_back(m_data[ii].nentries);
41  return result;
42 }
ii
Definition: cuy.py:589
std::vector< datacontainer > m_data

◆ getnpoints()

uint32_t SiPixelCalibDigi::getnpoints ( ) const
inline

Definition at line 24 of file SiPixelCalibDigi.h.

References m_data.

Referenced by operator<<().

24 { return m_data.size(); } // returns the number of calibration points
std::vector< datacontainer > m_data

◆ getsum() [1/2]

uint32_t SiPixelCalibDigi::getsum ( uint32_t  ipoint) const
inline

Definition at line 25 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

25  {
26  return m_data[ipoint].adccountsum;
27  } // returns the sum of adc counts for the collected events at point ipoint
std::vector< datacontainer > m_data

◆ getsum() [2/2]

std::vector< uint32_t > SiPixelCalibDigi::getsum ( ) const

Definition at line 44 of file SiPixelCalibDigi.cc.

References cuy::ii, m_data, and mps_fire::result.

44  {
45  std::vector<uint32_t> result(0);
46  for (uint32_t ii = 0; ii < m_data.size(); ++ii)
47  result.push_back(m_data[ii].adccountsum);
48  return result;
49 }
ii
Definition: cuy.py:589
std::vector< datacontainer > m_data

◆ getsumsquares() [1/2]

uint32_t SiPixelCalibDigi::getsumsquares ( uint32_t  ipoint) const
inline

Definition at line 28 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

28  {
29  return m_data[ipoint].adccountsumsq;
30  } // returns the sum of the squares of adc counts for the collected events at point ipoint
std::vector< datacontainer > m_data

◆ getsumsquares() [2/2]

std::vector< uint32_t > SiPixelCalibDigi::getsumsquares ( ) const

Definition at line 51 of file SiPixelCalibDigi.cc.

References cuy::ii, m_data, and mps_fire::result.

51  {
52  std::vector<uint32_t> result(0);
53  for (uint32_t ii = 0; ii < m_data.size(); ++ii)
54  result.push_back(m_data[ii].adccountsumsq);
55  return result;
56 }
ii
Definition: cuy.py:589
std::vector< datacontainer > m_data

◆ init()

void SiPixelCalibDigi::init ( uint16_t  row,
uint16_t  col,
uint16_t  npoints 
)

Definition at line 9 of file SiPixelCalibDigi.cc.

References col(), reset(), row(), and setrowcol().

9  {
10  setrowcol(row, col);
11  reset();
12  // expand if size of arrays has changed.... not implemented yet...
13 }
uint16_t row() const
void setrowcol(uint16_t row, uint16_t col)
uint16_t col() const

◆ reset()

void SiPixelCalibDigi::reset ( void  )

Definition at line 15 of file SiPixelCalibDigi.cc.

References m_data.

Referenced by init(), and SiPixelCalibDigi().

15  {
16  for (uint32_t iter = 0; iter < m_data.size(); ++iter) {
17  m_data[iter].nentries = 0;
18  m_data[iter].adccountsum = 0;
19  m_data[iter].adccountsumsq = 0;
20  }
21 }
std::vector< datacontainer > m_data

◆ row()

uint16_t SiPixelCalibDigi::row ( ) const
inline

Definition at line 37 of file SiPixelCalibDigi.h.

References m_row_and_column.

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

37 { return m_row_and_column.first; }
std::pair< uint16_t, uint16_t > m_row_and_column

◆ row_and_col()

std::pair<uint16_t, uint16_t> SiPixelCalibDigi::row_and_col ( ) const
inline

Definition at line 39 of file SiPixelCalibDigi.h.

References m_row_and_column.

39 { return m_row_and_column; }
std::pair< uint16_t, uint16_t > m_row_and_column

◆ setrowcol()

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().

32  {
33  m_row_and_column.first = row;
34  m_row_and_column.second = col;
35 }
uint16_t row() const
std::pair< uint16_t, uint16_t > m_row_and_column
uint16_t col() const

Member Data Documentation

◆ m_data

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

Definition at line 50 of file SiPixelCalibDigi.h.

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

◆ m_row_and_column

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

Definition at line 51 of file SiPixelCalibDigi.h.

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