![]() |
![]() |
#include <DataFormats/HcalDigi/interface/ZDCDataFrame.h>
Public Types | |
typedef HcalZDCDetId | key_type |
For the sorted collection. | |
Public Member Functions | |
const HcalElectronicsId & | elecId () const |
const HcalZDCDetId & | 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) | |
ZDCDataFrame (const HcalZDCDetId &id) | |
ZDCDataFrame () | |
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_ |
HcalZDCDetId | id_ |
int | size_ |
Definition at line 15 of file ZDCDataFrame.h.
typedef HcalZDCDetId ZDCDataFrame::key_type |
ZDCDataFrame::ZDCDataFrame | ( | ) |
Definition at line 3 of file ZDCDataFrame.cc.
00003 : id_(0), 00004 size_(0), 00005 hcalPresamples_(0) 00006 { 00007 }
ZDCDataFrame::ZDCDataFrame | ( | const HcalZDCDetId & | id | ) | [explicit] |
Definition at line 9 of file ZDCDataFrame.cc.
00009 : 00010 id_(id), 00011 size_(0), 00012 hcalPresamples_(0) 00013 { 00014 // TODO : test id for ZDC 00015 }
const HcalElectronicsId& ZDCDataFrame::elecId | ( | ) | const [inline] |
Definition at line 23 of file ZDCDataFrame.h.
References electronicsId_.
00023 { return electronicsId_; }
const HcalZDCDetId& ZDCDataFrame::id | ( | void | ) | const [inline] |
Definition at line 22 of file ZDCDataFrame.h.
References id_.
Referenced by HcalNominalCoder::adc2fC(), and operator<<().
00022 { return id_; }
const HcalQIESample& ZDCDataFrame::operator[] | ( | int | i | ) | const [inline] |
int ZDCDataFrame::presamples | ( | ) | const [inline] |
number of samples before the sample from the triggered beam crossing (according to the hardware)
Definition at line 28 of file ZDCDataFrame.h.
References hcalPresamples_.
Referenced by HcalNominalCoder::adc2fC(), and operator<<().
00028 { return hcalPresamples_&0xF; }
const HcalQIESample& ZDCDataFrame::sample | ( | int | i | ) | const [inline] |
access a sample
Definition at line 37 of file ZDCDataFrame.h.
References data_.
Referenced by operator<<().
Definition at line 22 of file ZDCDataFrame.cc.
References hcalPresamples_.
00022 { 00023 hcalPresamples_|=ps&0xF; 00024 }
void ZDCDataFrame::setReadoutIds | ( | const HcalElectronicsId & | eid | ) |
Definition at line 25 of file ZDCDataFrame.cc.
References electronicsId_.
00025 { 00026 electronicsId_=eid; 00027 }
void ZDCDataFrame::setSample | ( | int | i, | |
const HcalQIESample & | sam | |||
) | [inline] |
Definition at line 17 of file ZDCDataFrame.cc.
References MAXSAMPLES, and size_.
00017 { 00018 if (size>MAXSAMPLES) size_=MAXSAMPLES; 00019 else if (size<=0) size_=0; 00020 else size_=size; 00021 }
Definition at line 41 of file ZDCDataFrame.cc.
References hcalPresamples_.
00041 { 00042 if (markAndPass) hcalPresamples_|=0x10; 00043 if (unsuppressed) hcalPresamples_|=0x20; 00044 }
total number of samples in the digi
Definition at line 26 of file ZDCDataFrame.h.
References size_.
Referenced by HcalNominalCoder::adc2fC(), and operator<<().
00026 { return size_&0xF; }
validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is all)
Definition at line 29 of file ZDCDataFrame.cc.
References HcalQIESample::capid(), data_, i, and size_.
00029 { 00030 int capid=-1; 00031 bool ok=true; 00032 for (int i=0; ok && i<nSamples && i+firstSample<size_; i++) { 00033 if (data_[i+firstSample].er() || !data_[i+firstSample].dv()) ok=false; 00034 if (i==0) capid=data_[i+firstSample].capid(); 00035 if (capid!=data_[i+firstSample].capid()) ok=false; 00036 capid=(capid+1)%4; 00037 } 00038 return ok; 00039 }
bool ZDCDataFrame::zsMarkAndPass | ( | ) | const [inline] |
was ZS MarkAndPass?
Definition at line 30 of file ZDCDataFrame.h.
References hcalPresamples_.
Referenced by operator<<().
00030 { return (hcalPresamples_&0x10); }
bool ZDCDataFrame::zsUnsuppressed | ( | ) | const [inline] |
was ZS unsuppressed?
Definition at line 32 of file ZDCDataFrame.h.
References hcalPresamples_.
Referenced by operator<<().
00032 { return (hcalPresamples_&0x20); }
HcalQIESample ZDCDataFrame::data_[MAXSAMPLES] [private] |
Definition at line 54 of file ZDCDataFrame.h.
Referenced by operator[](), sample(), setSample(), and validate().
int ZDCDataFrame::hcalPresamples_ [private] |
Definition at line 53 of file ZDCDataFrame.h.
Referenced by presamples(), setPresamples(), setZSInfo(), zsMarkAndPass(), and zsUnsuppressed().
HcalZDCDetId ZDCDataFrame::id_ [private] |
const int ZDCDataFrame::MAXSAMPLES = 10 [static] |
int ZDCDataFrame::size_ [private] |