CMS 3D CMS Logo

CTPPSPixelDigi.cc
Go to the documentation of this file.
2 
4 const uint32_t CTPPSPixelDigi::row_shift = 0;
5 const uint32_t CTPPSPixelDigi::column_shift = 11;
6 const uint32_t CTPPSPixelDigi::adc_shift = 22;
7 const uint32_t CTPPSPixelDigi::row_width = 11;
8 const uint32_t CTPPSPixelDigi::column_width = 11;
9 const uint32_t CTPPSPixelDigi::adc_width = 10;
10 const uint32_t CTPPSPixelDigi::row_mask = 0x7FF;
11 const uint32_t CTPPSPixelDigi::column_mask = 0x7FF;
12 const uint32_t CTPPSPixelDigi::adc_mask = 0x3FF;
13 const uint32_t CTPPSPixelDigi::rowcol_mask = 0x3FFFFF;
14 const uint32_t CTPPSPixelDigi::max_row = 0x7FF;
15 const uint32_t CTPPSPixelDigi::max_column = 0x7FF;
16 const uint32_t CTPPSPixelDigi::max_adc = 0x3FF;
17 
18 const uint32_t CTPPSPixelDigi::column_width_ch = 11;
19 const uint32_t CTPPSPixelDigi::column_mask_ch = 0x7FF;
20 const uint32_t CTPPSPixelDigi::row_mask_ch = 0x7FF;
21 
22 void CTPPSPixelDigi::init(int row, int col, int adc) {
23 
25  adc = (uint32_t(adc) > max_adc) ? max_adc : std::max(adc,0);
26 
27  theData = (row << row_shift) |
28  (col << column_shift) |
29  (adc << adc_shift);
30 
31 }
int adc(sample_type sample)
get the ADC sample (12 bits)
static const uint32_t row_mask_ch
static const uint32_t column_width
static const uint32_t rowcol_mask
static const uint32_t adc_mask
static const uint32_t column_width_ch
const values for channel definition with bit structure: row_bits+col_bits
static const uint32_t column_mask_ch
void init(int row, int col, int adc)
static const uint32_t adc_shift
static const uint32_t row_mask
static const uint32_t row_shift
const values for digi packing with bit structure: adc_bits+col_bits+row_bits
static const uint32_t adc_width
uint32_t theData
col
Definition: cuy.py:1010
static const uint32_t max_row
static const uint32_t column_shift
static const uint32_t max_column
static const uint32_t row_width
static const uint32_t column_mask
static const uint32_t max_adc