CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
PixelChannelIdentifier::Packing Class Reference

Public Member Functions

 Packing (const int row_w, const int column_w, const int time_w, const int adc_w)
 

Public Attributes

PackedDigiType adc_mask
 
int adc_shift
 
int adc_width
 
PackedDigiType column_mask
 
int column_shift
 
int column_width
 
int max_adc
 
int max_column
 
int max_row
 
PackedDigiType row_mask
 
int row_shift
 
int row_width
 
PackedDigiType time_mask
 
int time_shift
 

Detailed Description

Pack the pixel information to use less memory

Definition at line 27 of file PixelChannelIdentifier.h.

Constructor & Destructor Documentation

PixelChannelIdentifier::Packing::Packing ( const int  row_w,
const int  column_w,
const int  time_w,
const int  adc_w 
)

Definition at line 9 of file PixelChannelIdentifier.cc.

References adc_mask, adc_shift, column_mask, column_shift, gather_cfg::cout, max_adc, max_column, max_row, row_mask, row_shift, time_mask, and time_shift.

10  :
11  row_width(row_w), column_width(column_w), adc_width(adc_w)
12 {
13  // Constructor: pre-computes masks and shifts from field widths
14  // Order of fields (from right to left) is
15  // row, column, time, adc count.
16 
17  if ( row_w+column_w+time_w+adc_w != 32) {
18  std::cout << std::endl << "Warning in PixelDigi::Packing constructor:"
19  << "sum of field widths != 32" << std::endl;
20  }
21  // Fields are counted from right to left!
22 
23  row_shift = 0;
24  column_shift = row_shift + row_w;
25  time_shift = column_shift + column_w;
26  adc_shift = time_shift + time_w;
27 
28  row_mask = ~(~0 << row_w);
29  column_mask = ~(~0 << column_w);
30  time_mask = ~(~0 << time_w);
31  adc_mask = ~(~0 << adc_w);
32 
33  max_row = row_mask;
35  max_adc = adc_mask;
36 
37 }
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

PackedDigiType PixelChannelIdentifier::Packing::adc_mask

Definition at line 40 of file PixelChannelIdentifier.h.

Referenced by PixelDigi::adc(), and Packing().

int PixelChannelIdentifier::Packing::adc_shift

Definition at line 35 of file PixelChannelIdentifier.h.

Referenced by PixelDigi::init(), and Packing().

int PixelChannelIdentifier::Packing::adc_width

Definition at line 47 of file PixelChannelIdentifier.h.

PackedDigiType PixelChannelIdentifier::Packing::column_mask
int PixelChannelIdentifier::Packing::column_shift

Definition at line 38 of file PixelChannelIdentifier.h.

Referenced by Packing().

int PixelChannelIdentifier::Packing::column_width
int PixelChannelIdentifier::Packing::max_adc

Definition at line 51 of file PixelChannelIdentifier.h.

Referenced by PixelDigi::init(), and Packing().

int PixelChannelIdentifier::Packing::max_column

Definition at line 50 of file PixelChannelIdentifier.h.

Referenced by Packing().

int PixelChannelIdentifier::Packing::max_row

Definition at line 49 of file PixelChannelIdentifier.h.

Referenced by Packing().

PackedDigiType PixelChannelIdentifier::Packing::row_mask
int PixelChannelIdentifier::Packing::row_shift

Definition at line 37 of file PixelChannelIdentifier.h.

Referenced by PixelDigi::init(), and Packing().

int PixelChannelIdentifier::Packing::row_width

Definition at line 45 of file PixelChannelIdentifier.h.

PackedDigiType PixelChannelIdentifier::Packing::time_mask

Definition at line 41 of file PixelChannelIdentifier.h.

Referenced by Packing().

int PixelChannelIdentifier::Packing::time_shift

Definition at line 36 of file PixelChannelIdentifier.h.

Referenced by Packing().