#include <DataFormats/HcalDigi/interface/HODataFrame.h>
Public Types | |
typedef HcalDetId | key_type |
For the sorted collection. | |
Public Member Functions | |
const HcalElectronicsId & | elecId () const |
HODataFrame (const HcalDetId &id) | |
HODataFrame () | |
const HcalDetId & | id () const |
const HcalQIESample & | operator[] (int i) const |
access a sample | |
int | presamples () const |
number of samples before the sample from the triggered beam crossing (according to the hardware) | |
const HcalQIESample & | sample (int i) const |
access a sample | |
void | setPresamples (int ps) |
void | setReadoutIds (const HcalElectronicsId &eid) |
void | setSample (int i, const HcalQIESample &sam) |
void | setSize (int size) |
void | setZSInfo (bool unsuppressed, bool markAndPass) |
int | size () const |
total number of samples in the digi | |
bool | validate (int firstSample=0, int nSamples=100) const |
validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is all) | |
bool | zsMarkAndPass () const |
was ZS MarkAndPass? | |
bool | zsUnsuppressed () const |
was ZS unsuppressed? | |
Static Public Attributes | |
static const int | MAXSAMPLES = 10 |
Private Attributes | |
HcalQIESample | data_ [MAXSAMPLES] |
HcalElectronicsId | electronicsId_ |
int | hcalPresamples_ |
HcalDetId | id_ |
int | size_ |
Definition at line 16 of file HODataFrame.h.
typedef HcalDetId HODataFrame::key_type |
HODataFrame::HODataFrame | ( | ) |
Definition at line 4 of file HODataFrame.cc.
00004 : id_(0), 00005 size_(0), 00006 hcalPresamples_(0) 00007 { 00008 }
HODataFrame::HODataFrame | ( | const HcalDetId & | id | ) | [explicit] |
Definition at line 10 of file HODataFrame.cc.
00010 : 00011 id_(id), 00012 size_(0), 00013 hcalPresamples_(0) 00014 { 00015 // TODO : test id for HcalOuter 00016 }
const HcalElectronicsId& HODataFrame::elecId | ( | ) | const [inline] |
Definition at line 24 of file HODataFrame.h.
References electronicsId_.
Referenced by HcalDigiMonitor::processEvent().
00024 { return electronicsId_; }
Definition at line 23 of file HODataFrame.h.
References id_.
Referenced by HcalNominalCoder::adc2fC(), HcalPedestalsAnalysis::analyze(), operator<<(), HcalLaserMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalLEDMonitor::processEvent(), HcalPedestalAnalysis::processEvent(), HcalPedestalMonitor::processEvent(), HcalMTCCMonitor::processEvent(), HcalExpertMonitor::processEvent_Digi(), HcalDeadCellMonitor::processEvent_digi(), HcalHotCellMonitor::processEvent_pedestal(), and HcalLedAnalysis::processLedEvent().
00023 { return id_; }
const HcalQIESample& HODataFrame::operator[] | ( | int | i | ) | const [inline] |
int HODataFrame::presamples | ( | ) | const [inline] |
number of samples before the sample from the triggered beam crossing (according to the hardware)
Definition at line 29 of file HODataFrame.h.
References hcalPresamples_.
Referenced by HcalNominalCoder::adc2fC(), operator<<(), and HcalDigiMonitor::processEvent().
00029 { return hcalPresamples_&0xF; }
const HcalQIESample& HODataFrame::sample | ( | int | i | ) | const [inline] |
access a sample
Definition at line 38 of file HODataFrame.h.
References data_.
Referenced by HcalPedestalsAnalysis::analyze(), operator<<(), HcalLaserMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalTrigPrimMonitor::processEvent(), HcalPedestalAnalysis::processEvent(), HcalLEDMonitor::processEvent(), HcalPedestalMonitor::processEvent(), HcalDeadCellMonitor::processEvent_digi(), and HcalHotCellMonitor::processEvent_pedestal().
Definition at line 23 of file HODataFrame.cc.
References hcalPresamples_.
00023 { 00024 hcalPresamples_|=ps&0xF; 00025 }
void HODataFrame::setReadoutIds | ( | const HcalElectronicsId & | eid | ) |
Definition at line 26 of file HODataFrame.cc.
References electronicsId_.
00026 { 00027 electronicsId_=eid; 00028 }
void HODataFrame::setSample | ( | int | i, | |
const HcalQIESample & | sam | |||
) | [inline] |
Definition at line 18 of file HODataFrame.cc.
References MAXSAMPLES, and size_.
00018 { 00019 if (size>MAXSAMPLES) size_=MAXSAMPLES; 00020 else if (size<=0) size_=0; 00021 else size_=size; 00022 }
Definition at line 42 of file HODataFrame.cc.
References hcalPresamples_.
00042 { 00043 if (markAndPass) hcalPresamples_|=0x10; 00044 if (unsuppressed) hcalPresamples_|=0x20; 00045 }
total number of samples in the digi
Definition at line 27 of file HODataFrame.h.
References size_.
Referenced by HcalNominalCoder::adc2fC(), HcalPedestalsAnalysis::analyze(), operator<<(), HcalLaserMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalTrigPrimMonitor::processEvent(), HcalLEDMonitor::processEvent(), HcalPedestalAnalysis::processEvent(), HcalPedestalMonitor::processEvent(), HcalDeadCellMonitor::processEvent_digi(), and HcalHotCellMonitor::processEvent_pedestal().
00027 { return size_&0xF; }
validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is all)
Definition at line 30 of file HODataFrame.cc.
References HcalQIESample::capid(), data_, i, and size_.
00030 { 00031 int capid=-1; 00032 bool ok=true; 00033 for (int i=0; ok && i<nSamples && i+firstSample<size_; i++) { 00034 if (data_[i+firstSample].er() || !data_[i+firstSample].dv()) ok=false; 00035 if (i==0) capid=data_[i+firstSample].capid(); 00036 if (capid!=data_[i+firstSample].capid()) ok=false; 00037 capid=(capid+1)%4; 00038 } 00039 return ok; 00040 }
bool HODataFrame::zsMarkAndPass | ( | ) | const [inline] |
was ZS MarkAndPass?
Definition at line 31 of file HODataFrame.h.
References hcalPresamples_.
Referenced by operator<<().
00031 { return (hcalPresamples_&0x10); }
bool HODataFrame::zsUnsuppressed | ( | ) | const [inline] |
was ZS unsuppressed?
Definition at line 33 of file HODataFrame.h.
References hcalPresamples_.
Referenced by operator<<().
00033 { return (hcalPresamples_&0x20); }
HcalQIESample HODataFrame::data_[MAXSAMPLES] [private] |
Definition at line 55 of file HODataFrame.h.
Referenced by operator[](), sample(), setSample(), and validate().
HcalElectronicsId HODataFrame::electronicsId_ [private] |
int HODataFrame::hcalPresamples_ [private] |
Definition at line 54 of file HODataFrame.h.
Referenced by presamples(), setPresamples(), setZSInfo(), zsMarkAndPass(), and zsUnsuppressed().
HcalDetId HODataFrame::id_ [private] |
const int HODataFrame::MAXSAMPLES = 10 [static] |
int HODataFrame::size_ [private] |