#include <DataFormats/EcalDigi/interface/EcalPseudoStripInputDigi.h>
Public Types | |
typedef EcalTriggerElectronicsId | key_type |
For the sorted collection. | |
Public Member Functions | |
EcalPseudoStripInputDigi (const EcalTriggerElectronicsId &id) | |
EcalPseudoStripInputDigi () | |
bool | fineGrain () const |
get the fine-grain bit of interesting sample | |
const EcalTriggerElectronicsId & | id () const |
bool | isDebug () const |
True if debug mode (# of samples > 1). | |
const EcalPseudoStripInputSample & | operator[] (int i) const |
int | pseudoStripInput () const |
get the encoded/compressed Et of interesting sample | |
const EcalPseudoStripInputSample & | sample (int i) const |
int | sampleOfInterest () const |
Gets the interesting sample. | |
void | setSample (int i, const EcalPseudoStripInputSample &sam) |
void | setSampleValue (int i, uint16_t value) |
void | setSize (int size) |
int | size () const |
Static Public Attributes | |
static const int | MAXSAMPLES = 20 |
Private Attributes | |
std::vector < EcalPseudoStripInputSample > | data_ |
EcalTriggerElectronicsId | id_ |
int | size_ |
Definition at line 16 of file EcalPseudoStripInputDigi.h.
EcalPseudoStripInputDigi::EcalPseudoStripInputDigi | ( | ) |
Definition at line 4 of file EcalPseudoStripInputDigi.cc.
00004 : size_(0), data_(MAXSAMPLES) { 00005 }
EcalPseudoStripInputDigi::EcalPseudoStripInputDigi | ( | const EcalTriggerElectronicsId & | id | ) | [explicit] |
Definition at line 7 of file EcalPseudoStripInputDigi.cc.
00007 : id_(id), 00008 size_(0), data_(MAXSAMPLES) { 00009 }
bool EcalPseudoStripInputDigi::fineGrain | ( | ) | const |
get the fine-grain bit of interesting sample
Definition at line 32 of file EcalPseudoStripInputDigi.cc.
References data_, sample(), and sampleOfInterest().
00033 { 00034 int sample = sampleOfInterest(); 00035 if (sample != -1) 00036 return data_[sample].fineGrain(); 00037 else 00038 return false; 00039 }
const EcalTriggerElectronicsId& EcalPseudoStripInputDigi::id | ( | void | ) | const [inline] |
Definition at line 23 of file EcalPseudoStripInputDigi.h.
References id_.
Referenced by operator<<().
00023 { return id_; }
bool EcalPseudoStripInputDigi::isDebug | ( | ) | const |
const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::operator[] | ( | int | i | ) | const [inline] |
int EcalPseudoStripInputDigi::pseudoStripInput | ( | ) | const |
get the encoded/compressed Et of interesting sample
get the pseudoStrip input of interesting sample
Definition at line 22 of file EcalPseudoStripInputDigi.cc.
References data_, sample(), and sampleOfInterest().
00023 { 00024 int sample = sampleOfInterest(); 00025 if (sample != -1) 00026 return data_[sample].pseudoStripInput(); 00027 else 00028 return -1; 00029 }
const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::sample | ( | int | i | ) | const [inline] |
Definition at line 27 of file EcalPseudoStripInputDigi.h.
References data_.
Referenced by fineGrain(), operator<<(), and pseudoStripInput().
int EcalPseudoStripInputDigi::sampleOfInterest | ( | ) | const |
Gets the interesting sample.
Definition at line 11 of file EcalPseudoStripInputDigi.cc.
References size_.
Referenced by fineGrain(), and pseudoStripInput().
00012 { 00013 if (size_ == 1) 00014 return 0; 00015 else if (size_ == 5) 00016 return 2; 00017 else 00018 return -1; 00019 }
void EcalPseudoStripInputDigi::setSample | ( | int | i, | |
const EcalPseudoStripInputSample & | sam | |||
) | [inline] |
Definition at line 50 of file EcalPseudoStripInputDigi.cc.
References MAXSAMPLES, and size_.
00050 { 00051 if (size<0) size_=0; 00052 else if (size>MAXSAMPLES) size_=MAXSAMPLES; 00053 else size_=size; 00054 }
Definition at line 24 of file EcalPseudoStripInputDigi.h.
References size_.
Referenced by operator<<().
00024 { return size_; }
std::vector<EcalPseudoStripInputSample> EcalPseudoStripInputDigi::data_ [private] |
Definition at line 52 of file EcalPseudoStripInputDigi.h.
Referenced by fineGrain(), operator[](), pseudoStripInput(), sample(), setSample(), and setSampleValue().
const int EcalPseudoStripInputDigi::MAXSAMPLES = 20 [static] |
int EcalPseudoStripInputDigi::size_ [private] |
Definition at line 51 of file EcalPseudoStripInputDigi.h.
Referenced by isDebug(), sampleOfInterest(), setSize(), and size().