#include <DataFormats/HcalDigi/interface/CastorDataFrame.h>
Public Types | |
typedef HcalCastorDetId | key_type |
For the sorted collection. | |
Public Member Functions | |
CastorDataFrame (const HcalCastorDetId &id) | |
CastorDataFrame () | |
const HcalCastorDetId & | 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 | setSample (int i, const HcalQIESample &sam) |
void | setSize (int size) |
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] |
int | hcalPresamples_ |
HcalCastorDetId | id_ |
int | size_ |
Definition at line 15 of file CastorDataFrame.h.
CastorDataFrame::CastorDataFrame | ( | ) |
Definition at line 3 of file CastorDataFrame.cc.
00003 : id_(0), 00004 size_(0), 00005 hcalPresamples_(0) 00006 { 00007 }
CastorDataFrame::CastorDataFrame | ( | const HcalCastorDetId & | id | ) | [explicit] |
Definition at line 9 of file CastorDataFrame.cc.
00009 : 00010 id_(id), 00011 size_(0), 00012 hcalPresamples_(0) 00013 { 00014 // TODO : test id for CASTOR 00015 }
const HcalCastorDetId& CastorDataFrame::id | ( | void | ) | const [inline] |
Definition at line 22 of file CastorDataFrame.h.
References id_.
Referenced by CastorNominalCoder::adc2fC(), operator<<(), CastorPedestalAnalysis::processEvent(), and CastorLedAnalysis::processLedEvent().
00022 { return id_; }
const HcalQIESample& CastorDataFrame::operator[] | ( | int | i | ) | const [inline] |
int CastorDataFrame::presamples | ( | ) | const [inline] |
number of samples before the sample from the triggered beam crossing (according to the hardware)
Definition at line 28 of file CastorDataFrame.h.
References hcalPresamples_.
Referenced by CastorNominalCoder::adc2fC(), and operator<<().
00028 { return hcalPresamples_&0xF; }
const HcalQIESample& CastorDataFrame::sample | ( | int | i | ) | const [inline] |
access a sample
Definition at line 37 of file CastorDataFrame.h.
References data_.
Referenced by operator<<(), and CastorPedestalAnalysis::processEvent().
Definition at line 22 of file CastorDataFrame.cc.
References hcalPresamples_.
00022 { 00023 hcalPresamples_=ps; 00024 }
void CastorDataFrame::setSample | ( | int | i, | |
const HcalQIESample & | sam | |||
) | [inline] |
Definition at line 17 of file CastorDataFrame.cc.
References MAXSAMPLES, and size_.
00017 { 00018 if (size>MAXSAMPLES) size_=MAXSAMPLES; 00019 else if (size<=0) size_=0; 00020 else size_=size; 00021 }
total number of samples in the digi
Definition at line 26 of file CastorDataFrame.h.
References size_.
Referenced by CastorNominalCoder::adc2fC(), operator<<(), and CastorPedestalAnalysis::processEvent().
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 CastorDataFrame.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 CastorDataFrame::zsMarkAndPass | ( | ) | const [inline] |
was ZS MarkAndPass?
Definition at line 30 of file CastorDataFrame.h.
References hcalPresamples_.
00030 { return (hcalPresamples_&0x10); }
bool CastorDataFrame::zsUnsuppressed | ( | ) | const [inline] |
was ZS unsuppressed?
Definition at line 32 of file CastorDataFrame.h.
References hcalPresamples_.
00032 { return (hcalPresamples_&0x20); }
HcalQIESample CastorDataFrame::data_[MAXSAMPLES] [private] |
Definition at line 53 of file CastorDataFrame.h.
Referenced by operator[](), sample(), setSample(), and validate().
int CastorDataFrame::hcalPresamples_ [private] |
Definition at line 52 of file CastorDataFrame.h.
Referenced by presamples(), setPresamples(), zsMarkAndPass(), and zsUnsuppressed().
HcalCastorDetId CastorDataFrame::id_ [private] |
const int CastorDataFrame::MAXSAMPLES = 10 [static] |
Definition at line 47 of file CastorDataFrame.h.
Referenced by CastorUnpacker::CastorUnpacker(), and setSize().
int CastorDataFrame::size_ [private] |