CMS 3D CMS Logo

Public Member Functions | Public Attributes

PixelChannelIdentifier::Packing Class Reference

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, gather_cfg::cout, max_adc, max_column, max_row, row_mask, row_shift, time_mask, and time_shift.

                                                               :
  row_width(row_w), column_width(column_w), adc_width(adc_w) 
{
  // Constructor: pre-computes masks and shifts from field widths
  // Order of fields (from right to left) is
  // row, column, time, adc count.

  if ( row_w+column_w+time_w+adc_w != 32) {
    std::cout << std::endl << "Warning in PixelDigi::Packing constructor:" 
         << "sum of field widths != 32" << std::endl;
  }
  // Fields are counted from right to left!

  row_shift     = 0;
  column_shift  = row_shift + row_w;
  time_shift    = column_shift + column_w;
  adc_shift     = time_shift + time_w;
  
  row_mask     = ~(~0 << row_w);
  column_mask  = ~(~0 << column_w);
  time_mask    = ~(~0 << time_w);
  adc_mask     = ~(~0 << adc_w);

  max_row = row_mask;
  max_column = column_mask;
  max_adc = adc_mask;

}

Member Data Documentation

Definition at line 40 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 35 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 47 of file PixelChannelIdentifier.h.

Definition at line 43 of file PixelChannelIdentifier.h.

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

Definition at line 38 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 51 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 50 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 49 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 42 of file PixelChannelIdentifier.h.

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

Definition at line 37 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 45 of file PixelChannelIdentifier.h.

Definition at line 41 of file PixelChannelIdentifier.h.

Referenced by Packing().

Definition at line 36 of file PixelChannelIdentifier.h.

Referenced by Packing().