CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::SiPixelCalibDigi ( int  packed_value,
uint16_t  row,
uint16_t  col 
)
inline

Definition at line 12 of file SiPixelCalibDigi.h.

References reset().

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

Definition at line 13 of file SiPixelCalibDigi.h.

References reset().

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

Definition at line 14 of file SiPixelCalibDigi.h.

14 :m_data(0),m_row_and_column(0,0){;}
std::vector< datacontainer > m_data
std::pair< uint16_t, uint16_t > m_row_and_column
virtual SiPixelCalibDigi::~SiPixelCalibDigi ( )
inlinevirtual

Definition at line 15 of file SiPixelCalibDigi.h.

15 {;}

Member Function Documentation

uint16_t SiPixelCalibDigi::col ( ) const
inline

Definition at line 31 of file SiPixelCalibDigi.h.

References m_row_and_column.

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

31 {return m_row_and_column.second;}
std::pair< uint16_t, uint16_t > m_row_and_column
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
uint32_t SiPixelCalibDigi::getnentries ( uint32_t  ipoint) const
inline

Definition at line 26 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

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

Definition at line 37 of file SiPixelCalibDigi.cc.

References m_data, and query::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 }
tuple result
Definition: query.py:137
std::vector< datacontainer > m_data
uint32_t SiPixelCalibDigi::getnpoints ( ) const
inline

Definition at line 23 of file SiPixelCalibDigi.h.

References m_data.

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

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

Definition at line 24 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

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

Definition at line 44 of file SiPixelCalibDigi.cc.

References m_data, and query::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 }
tuple result
Definition: query.py:137
std::vector< datacontainer > m_data
uint32_t SiPixelCalibDigi::getsumsquares ( uint32_t  ipoint) const
inline

Definition at line 25 of file SiPixelCalibDigi.h.

References plotBeamSpotDB::ipoint, and m_data.

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

Definition at line 51 of file SiPixelCalibDigi.cc.

References m_data, and query::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 }
tuple result
Definition: query.py:137
std::vector< datacontainer > m_data
void SiPixelCalibDigi::init ( uint16_t  row,
uint16_t  col,
uint16_t  npoints 
)

Definition at line 9 of file SiPixelCalibDigi.cc.

References reset(), 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
uint16_t col() const
void setrowcol(uint16_t row, uint16_t col)
void SiPixelCalibDigi::reset ( void  )

Definition at line 15 of file SiPixelCalibDigi.cc.

References m_data.

Referenced by BeautifulSoup.BeautifulStoneSoup::__init__(), 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
uint16_t SiPixelCalibDigi::row ( ) const
inline

Definition at line 30 of file SiPixelCalibDigi.h.

References m_row_and_column.

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

30 {return m_row_and_column.first;}
std::pair< uint16_t, uint16_t > m_row_and_column
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.

32 {return m_row_and_column;}
std::pair< uint16_t, uint16_t > 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().

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

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