#include <HcalUpgradeQIESample.h>
Public Member Functions | |
int | adc () const |
get the ADC sample | |
int | capid () const |
get the Capacitor id | |
bool | dv () const |
is the Data Valid bit set? | |
bool | er () const |
is the error bit set? | |
int | fiber () const |
get the fiber number | |
int | fiberAndChan () const |
get the id channel | |
int | fiberChan () const |
get the fiber channel number | |
HcalUpgradeQIESample () | |
HcalUpgradeQIESample (uint16_t data) | |
HcalUpgradeQIESample (int adc, int capid, int fiber, int fiberchan, bool dv=true, bool er=false) | |
double | nominal_fC () const |
get the nominal FC (no calibrations applied) | |
uint16_t | operator() () |
for streaming | |
uint16_t | raw () const |
get the raw word | |
Private Attributes | |
uint16_t | theSample |
Simple container packer/unpacker for a single QIE data word
Definition at line 15 of file HcalUpgradeQIESample.h.
HcalUpgradeQIESample::HcalUpgradeQIESample | ( | ) | [inline] |
HcalUpgradeQIESample::HcalUpgradeQIESample | ( | uint16_t | data | ) | [inline] |
HcalUpgradeQIESample::HcalUpgradeQIESample | ( | int | adc, |
int | capid, | ||
int | fiber, | ||
int | fiberchan, | ||
bool | dv = true , |
||
bool | er = false |
||
) |
int HcalUpgradeQIESample::adc | ( | ) | const [inline] |
get the ADC sample
Definition at line 24 of file HcalUpgradeQIESample.h.
References theSample.
Referenced by nominal_fC(), and operator<<().
{ return theSample&0xFF; }
int HcalUpgradeQIESample::capid | ( | ) | const [inline] |
get the Capacitor id
Definition at line 28 of file HcalUpgradeQIESample.h.
References theSample.
Referenced by operator<<().
{ return (theSample>>8)&0x3; }
bool HcalUpgradeQIESample::dv | ( | ) | const [inline] |
is the Data Valid bit set?
Definition at line 30 of file HcalUpgradeQIESample.h.
References theSample.
Referenced by operator<<().
{ return (theSample&0x0400)!=0; }
bool HcalUpgradeQIESample::er | ( | ) | const [inline] |
is the error bit set?
Definition at line 32 of file HcalUpgradeQIESample.h.
References theSample.
Referenced by operator<<().
{ return (theSample&0x0800)!=0; }
int HcalUpgradeQIESample::fiber | ( | ) | const [inline] |
get the fiber number
Definition at line 34 of file HcalUpgradeQIESample.h.
References theSample.
{ return ((theSample>>14)&0x7)+1; }
int HcalUpgradeQIESample::fiberAndChan | ( | ) | const [inline] |
get the id channel
Definition at line 38 of file HcalUpgradeQIESample.h.
References theSample.
{ return (theSample>>11)&0x1F; }
int HcalUpgradeQIESample::fiberChan | ( | ) | const [inline] |
get the fiber channel number
Definition at line 36 of file HcalUpgradeQIESample.h.
References theSample.
{ return (theSample>>12)&0x3; }
double HcalUpgradeQIESample::nominal_fC | ( | ) | const |
get the nominal FC (no calibrations applied)
Definition at line 32 of file HcalUpgradeQIESample.cc.
References adc(), and nominal_adc2fc.
{ return nominal_adc2fc[adc()]; }
uint16_t HcalUpgradeQIESample::operator() | ( | ) | [inline] |
for streaming
Definition at line 41 of file HcalUpgradeQIESample.h.
References theSample.
{ return theSample; }
uint16_t HcalUpgradeQIESample::raw | ( | ) | const [inline] |
get the raw word
Definition at line 22 of file HcalUpgradeQIESample.h.
References theSample.
{ return theSample; }
uint16_t HcalUpgradeQIESample::theSample [private] |
Definition at line 44 of file HcalUpgradeQIESample.h.
Referenced by adc(), capid(), dv(), er(), fiber(), fiberAndChan(), fiberChan(), HcalUpgradeQIESample(), operator()(), and raw().