CMS 3D CMS Logo

PixelChannelIdentifier::Packing Class Reference

Pack the pixel information to use less memory. More...

List of all members.

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, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), max_adc, max_column, max_row, row_mask, row_shift, time_mask, and time_shift.

00010                                                                :
00011   row_width(row_w), column_width(column_w), adc_width(adc_w) 
00012 {
00013   // Constructor: pre-computes masks and shifts from field widths
00014   // Order of fields (from right to left) is
00015   // row, column, time, adc count.
00016 
00017   if ( row_w+column_w+time_w+adc_w != 32) {
00018     std::cout << std::endl << "Warning in PixelDigi::Packing constructor:" 
00019          << "sum of field widths != 32" << std::endl;
00020   }
00021   // Fields are counted from right to left!
00022 
00023   row_shift     = 0;
00024   column_shift  = row_shift + row_w;
00025   time_shift    = column_shift + column_w;
00026   adc_shift     = time_shift + time_w;
00027   
00028   row_mask     = ~(~0 << row_w);
00029   column_mask  = ~(~0 << column_w);
00030   time_mask    = ~(~0 << time_w);
00031   adc_mask     = ~(~0 << adc_w);
00032 
00033   max_row = row_mask;
00034   max_column = column_mask;
00035   max_adc = adc_mask;
00036 
00037 }


Member Data Documentation

PackedDigiType PixelChannelIdentifier::Packing::adc_mask

Definition at line 40 of file PixelChannelIdentifier.h.

Referenced by Packing().

int PixelChannelIdentifier::Packing::adc_shift

Definition at line 35 of file PixelChannelIdentifier.h.

Referenced by Packing().

int PixelChannelIdentifier::Packing::adc_width

Definition at line 47 of file PixelChannelIdentifier.h.

PackedDigiType PixelChannelIdentifier::Packing::column_mask

Definition at line 43 of file PixelChannelIdentifier.h.

Referenced by PixelChannelIdentifier::channelToPixel(), and Packing().

int PixelChannelIdentifier::Packing::column_shift

Definition at line 38 of file PixelChannelIdentifier.h.

Referenced by Packing().

int PixelChannelIdentifier::Packing::column_width

Definition at line 46 of file PixelChannelIdentifier.h.

Referenced by PixelChannelIdentifier::channelToPixel(), and PixelChannelIdentifier::pixelToChannel().

int PixelChannelIdentifier::Packing::max_adc

Definition at line 51 of file PixelChannelIdentifier.h.

Referenced by 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

Definition at line 42 of file PixelChannelIdentifier.h.

Referenced by PixelChannelIdentifier::channelToPixel(), and Packing().

int PixelChannelIdentifier::Packing::row_shift

Definition at line 37 of file PixelChannelIdentifier.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:29:58 2009 for CMSSW by  doxygen 1.5.4