Public Member Functions | |
Packing (int noise_w, int pedestal_w, int gain_w, int status_w) | |
Public Attributes | |
PackedPixDbType | gain_mask |
int | gain_shift |
PackedPixDbType | noise_mask |
int | noise_shift |
int | noise_width |
PackedPixDbType | pedestal_mask |
int | pedestal_shift |
int | pedestal_width |
PackedPixDbType | status_mask |
int | status_shift |
int | status_width |
Definition at line 48 of file SiPixelDbItem.h.
Definition at line 79 of file SiPixelDbItem.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), gain_mask, gain_shift, noise_mask, noise_shift, pedestal_mask, pedestal_shift, status_mask, and status_shift.
00081 : noise_width(noise_w), pedestal_width(pedestal_w), status_width(status_w) 00082 { 00083 // Constructor: pre-computes masks and shifts from field widths 00084 // Order of fields (from right to left) is 00085 // noise, pedestal, gain, status count. 00086 00087 if ( noise_w+pedestal_w+gain_w+status_w != 32) { 00088 std::cout << std::endl << "Error in SiPixelDbItem::Packing constructor:" 00089 << "sum of field widths != 32" << std::endl; 00090 // TO DO: throw an exception? 00091 } 00092 00093 // Fields are counted from right to left! 00094 00095 noise_shift = 0; 00096 pedestal_shift = noise_shift + noise_w; 00097 gain_shift = pedestal_shift + pedestal_w; 00098 status_shift = gain_shift + gain_w; 00099 00100 // Ensure the complement of the correct 00101 // number of bits: 00102 PackedPixDbType zero32 = 0; // 32-bit wide 00103 00104 noise_mask = ~(~zero32 << noise_w); 00105 pedestal_mask = ~(~zero32 << pedestal_w); 00106 gain_mask = ~(~zero32 << gain_w); 00107 status_mask = ~(~zero32 << status_w); 00108 }
Definition at line 59 of file SiPixelDbItem.h.
Referenced by SiPixelDbItem::gain(), Packing(), and SiPixelDbItem::setGain().
Definition at line 55 of file SiPixelDbItem.h.
Referenced by SiPixelDbItem::gain(), Packing(), SiPixelDbItem::set(), and SiPixelDbItem::setGain().
Definition at line 60 of file SiPixelDbItem.h.
Referenced by SiPixelDbItem::noise(), Packing(), and SiPixelDbItem::setNoise().
Definition at line 56 of file SiPixelDbItem.h.
Referenced by SiPixelDbItem::noise(), Packing(), SiPixelDbItem::set(), and SiPixelDbItem::setNoise().
Definition at line 62 of file SiPixelDbItem.h.
Definition at line 61 of file SiPixelDbItem.h.
Referenced by Packing(), SiPixelDbItem::pedestal(), and SiPixelDbItem::setPedestal().
Definition at line 57 of file SiPixelDbItem.h.
Referenced by Packing(), SiPixelDbItem::pedestal(), SiPixelDbItem::set(), and SiPixelDbItem::setPedestal().
Definition at line 63 of file SiPixelDbItem.h.
Definition at line 58 of file SiPixelDbItem.h.
Referenced by Packing(), SiPixelDbItem::setStatus(), and SiPixelDbItem::status().
Definition at line 54 of file SiPixelDbItem.h.
Referenced by Packing(), SiPixelDbItem::set(), SiPixelDbItem::setStatus(), and SiPixelDbItem::status().
Definition at line 64 of file SiPixelDbItem.h.