#include <SiPixelDbItem.h>
Classes | |
class | Packing |
Pack the pixel information to use less memory. More... | |
Public Member Functions | |
float | gain () |
short | noise () |
PackedPixDbType | packedValue () |
short | pedestal () |
void | set (short noise, short pedestal, float gain, char status) |
A fast version which sets all in one go. More... | |
void | setGain (float g) |
void | setNoise (short n) |
void | setPackedVal (PackedPixDbType p) |
void | setPedestal (short p) |
void | setStatus (char s) |
SiPixelDbItem () | |
char | status () |
~SiPixelDbItem () | |
Private Types | |
typedef uint32_t | PackedPixDbType |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
PackedPixDbType | packedVal_ |
Static Private Attributes | |
static Packing | packing_ |
Friends | |
class | boost::serialization::access |
template<typename CondSerializationT , typename Enabled > | |
struct | cond::serialization::access |
Definition at line 21 of file SiPixelDbItem.h.
|
private |
Definition at line 22 of file SiPixelDbItem.h.
|
inline |
|
inline |
Definition at line 26 of file SiPixelDbItem.h.
|
inline |
Definition at line 29 of file SiPixelDbItem.h.
References SiPixelDbItem::Packing::gain_mask, SiPixelDbItem::Packing::gain_shift, packedVal_, and packing_.
Referenced by set().
|
inline |
Definition at line 27 of file SiPixelDbItem.h.
References SiPixelDbItem::Packing::noise_mask, SiPixelDbItem::Packing::noise_shift, packedVal_, and packing_.
Referenced by set().
|
inline |
|
inline |
Definition at line 28 of file SiPixelDbItem.h.
References packedVal_, packing_, SiPixelDbItem::Packing::pedestal_mask, and SiPixelDbItem::Packing::pedestal_shift.
Referenced by set().
|
private |
void SiPixelDbItem::set | ( | short | noise, |
short | pedestal, | ||
float | gain, | ||
char | status | ||
) |
A fast version which sets all in one go.
Definition at line 55 of file SiPixelDbItem.cc.
References gain(), SiPixelDbItem::Packing::gain_shift, createfilelist::int, noise(), SiPixelDbItem::Packing::noise_shift, packedVal_, packing_, pedestal(), SiPixelDbItem::Packing::pedestal_shift, status(), and SiPixelDbItem::Packing::status_shift.
Referenced by SiPixelDbItem().
void SiPixelDbItem::setGain | ( | float | g | ) |
Definition at line 38 of file SiPixelDbItem.cc.
References g, SiPixelDbItem::Packing::gain_mask, SiPixelDbItem::Packing::gain_shift, createfilelist::int, packedVal_, and packing_.
void SiPixelDbItem::setNoise | ( | short | n | ) |
The logic of individual setters: First, we put the new value into newXXX, which is a 32-bit word which has the new value at the bits where it should go, and 0's everywhere else. To make it, we:
Next, we prepare the oldValue with a whole where newXXX needs to go. ~(mask << shift) has 1's everywhere except where the new value will go, so AND-ing packedVal_ with it creates a ‘whole’ for the new value.
Finally, the new value is an OR of the two (since the wholes have 0's)
Example: 00 03 c3 02 – old, new one must blow c3 away, so we AND with ff ff 00 ff, and get 00 03 00 02. The new number is now positioned to be ff ff a2 ff, and then we AND these two and get 00 03 a2 02. We have replaced c3 with a2.
Definition at line 26 of file SiPixelDbItem.cc.
References dqmiodumpmetadata::n, SiPixelDbItem::Packing::noise_mask, SiPixelDbItem::Packing::noise_shift, packedVal_, and packing_.
|
inline |
Definition at line 33 of file SiPixelDbItem.h.
References AlCaHLTBitMon_ParallelJobs::p, and packedVal_.
void SiPixelDbItem::setPedestal | ( | short | p | ) |
Definition at line 32 of file SiPixelDbItem.cc.
References AlCaHLTBitMon_ParallelJobs::p, packedVal_, packing_, SiPixelDbItem::Packing::pedestal_mask, and SiPixelDbItem::Packing::pedestal_shift.
void SiPixelDbItem::setStatus | ( | char | s | ) |
Definition at line 48 of file SiPixelDbItem.cc.
References packedVal_, packing_, alignCSCRings::s, SiPixelDbItem::Packing::status_mask, and SiPixelDbItem::Packing::status_shift.
|
inline |
Definition at line 30 of file SiPixelDbItem.h.
References packedVal_, packing_, SiPixelDbItem::Packing::status_mask, and SiPixelDbItem::Packing::status_shift.
Referenced by set().
|
friend |
Definition at line 67 of file SiPixelDbItem.h.
|
friend |
Definition at line 67 of file SiPixelDbItem.h.
|
private |
Definition at line 43 of file SiPixelDbItem.h.
Referenced by gain(), noise(), packedValue(), pedestal(), set(), setGain(), setNoise(), setPackedVal(), setPedestal(), setStatus(), and status().
|
staticprivate |
Definition at line 65 of file SiPixelDbItem.h.
Referenced by gain(), noise(), pedestal(), set(), setGain(), setNoise(), setPedestal(), setStatus(), and status().