#include <HcalUpgradeDataFrame.h>
Public Types | |
typedef HcalDetId | key_type |
For the sorted collection. | |
Public Member Functions | |
uint16_t | adc (int iSample=0) const |
int | capId (int iSample=0) const |
HcalUpgradeDataFrame (HcalDetId id, int capId, int samples, int presamples) | |
HcalUpgradeDataFrame () | |
const HcalDetId & | id () const |
int | presamples () const |
void | setPresamples (int presamples) |
void | setSample (int relSample, const uint16_t adc, const uint8_t tdc, const bool dv) |
void | setSize (int size) |
void | setStartingCapId (int capId) |
int | size () const |
int | startingCapId () const |
uint8_t | tdc (int iSample=0) const |
bool | valid (int iSample=0) const |
Static Public Attributes | |
static const int | MAXSAMPLES = 10 |
Private Attributes | |
uint16_t | adc_ [MAXSAMPLES] |
int | capId_ |
bool | dv_ [MAXSAMPLES] |
HcalDetId | id_ |
int | presamples_ |
int | size_ |
uint8_t | tdc_ [MAXSAMPLES] |
Precision readout digi for Upgrade work.
Definition at line 14 of file HcalUpgradeDataFrame.h.
For the sorted collection.
Definition at line 16 of file HcalUpgradeDataFrame.h.
HcalUpgradeDataFrame::HcalUpgradeDataFrame | ( | ) |
Definition at line 4 of file HcalUpgradeDataFrame.cc.
: id_(0), capId_(0), size_(0), presamples_(0) { }
HcalUpgradeDataFrame::HcalUpgradeDataFrame | ( | HcalDetId | id, |
int | capId, | ||
int | samples, | ||
int | presamples | ||
) |
Definition at line 11 of file HcalUpgradeDataFrame.cc.
References setPresamples(), and setSize().
: id_(id), capId_(capId) { setSize(samples) ; setPresamples(presamples) ; }
uint16_t HcalUpgradeDataFrame::adc | ( | int | iSample = 0 | ) | const [inline] |
Definition at line 29 of file HcalUpgradeDataFrame.h.
References adc_.
Referenced by operator<<().
{ return adc_[iSample] ; }
int HcalUpgradeDataFrame::capId | ( | int | iSample = 0 | ) | const [inline] |
Definition at line 26 of file HcalUpgradeDataFrame.h.
References capId_.
Referenced by setStartingCapId().
{ return (capId_+iSample)%4; }
const HcalDetId& HcalUpgradeDataFrame::id | ( | void | ) | const [inline] |
Definition at line 21 of file HcalUpgradeDataFrame.h.
References id_.
Referenced by operator<<().
{ return id_; }
int HcalUpgradeDataFrame::presamples | ( | ) | const [inline] |
Definition at line 24 of file HcalUpgradeDataFrame.h.
References presamples_.
Referenced by operator<<(), and setPresamples().
{ return presamples_ ; }
void HcalUpgradeDataFrame::setPresamples | ( | int | presamples | ) |
Definition at line 24 of file HcalUpgradeDataFrame.cc.
References MAXSAMPLES, presamples(), and presamples_.
Referenced by HcalUpgradeDataFrame().
{ if (presamples>MAXSAMPLES) presamples_=MAXSAMPLES; else if (presamples<=0) presamples_=0; else presamples_=presamples; }
void HcalUpgradeDataFrame::setSample | ( | int | relSample, |
const uint16_t | adc, | ||
const uint8_t | tdc, | ||
const bool | dv | ||
) |
Definition at line 30 of file HcalUpgradeDataFrame.cc.
References adc_, dv_, presamples_, and tdc_.
void HcalUpgradeDataFrame::setSize | ( | int | size | ) |
Definition at line 18 of file HcalUpgradeDataFrame.cc.
References MAXSAMPLES, size(), and size_.
Referenced by HcalUpgradeDataFrame().
{ if (size>MAXSAMPLES) size_=MAXSAMPLES; else if (size<=0) size_=0; else size_=size; }
void HcalUpgradeDataFrame::setStartingCapId | ( | int | capId | ) | [inline] |
int HcalUpgradeDataFrame::size | ( | void | ) | const [inline] |
Definition at line 23 of file HcalUpgradeDataFrame.h.
References size_.
Referenced by operator<<(), and setSize().
{ return size_ ; }
int HcalUpgradeDataFrame::startingCapId | ( | ) | const [inline] |
uint8_t HcalUpgradeDataFrame::tdc | ( | int | iSample = 0 | ) | const [inline] |
Definition at line 30 of file HcalUpgradeDataFrame.h.
References tdc_.
Referenced by operator<<().
{ return tdc_[iSample] ; }
bool HcalUpgradeDataFrame::valid | ( | int | iSample = 0 | ) | const [inline] |
Definition at line 28 of file HcalUpgradeDataFrame.h.
References dv_.
Referenced by operator<<().
{ return dv_[iSample] ; }
uint16_t HcalUpgradeDataFrame::adc_[MAXSAMPLES] [private] |
Definition at line 43 of file HcalUpgradeDataFrame.h.
Referenced by adc(), and setSample().
int HcalUpgradeDataFrame::capId_ [private] |
Definition at line 40 of file HcalUpgradeDataFrame.h.
Referenced by capId(), setStartingCapId(), and startingCapId().
bool HcalUpgradeDataFrame::dv_[MAXSAMPLES] [private] |
Definition at line 42 of file HcalUpgradeDataFrame.h.
Referenced by setSample(), and valid().
HcalDetId HcalUpgradeDataFrame::id_ [private] |
Definition at line 39 of file HcalUpgradeDataFrame.h.
Referenced by id().
const int HcalUpgradeDataFrame::MAXSAMPLES = 10 [static] |
Definition at line 37 of file HcalUpgradeDataFrame.h.
Referenced by setPresamples(), and setSize().
int HcalUpgradeDataFrame::presamples_ [private] |
Definition at line 41 of file HcalUpgradeDataFrame.h.
Referenced by presamples(), setPresamples(), and setSample().
int HcalUpgradeDataFrame::size_ [private] |
Definition at line 41 of file HcalUpgradeDataFrame.h.
uint8_t HcalUpgradeDataFrame::tdc_[MAXSAMPLES] [private] |
Definition at line 44 of file HcalUpgradeDataFrame.h.
Referenced by setSample(), and tdc().