CMS 3D CMS Logo

EcalPseudoStripInputDigi Class Reference

$Id : $ More...

#include <DataFormats/EcalDigi/interface/EcalPseudoStripInputDigi.h>

List of all members.

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 EcalTriggerElectronicsIdid () const
bool isDebug () const
 True if debug mode (# of samples > 1).
const EcalPseudoStripInputSampleoperator[] (int i) const
int pseudoStripInput () const
 get the encoded/compressed Et of interesting sample
const EcalPseudoStripInputSamplesample (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_


Detailed Description

$Id : $

Definition at line 16 of file EcalPseudoStripInputDigi.h.


Member Typedef Documentation

typedef EcalTriggerElectronicsId EcalPseudoStripInputDigi::key_type

For the sorted collection.

Definition at line 18 of file EcalPseudoStripInputDigi.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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

True if debug mode (# of samples > 1).

Definition at line 41 of file EcalPseudoStripInputDigi.cc.

References size_.

00042 {
00043   if (size_ == 1)
00044     return false;
00045   else if (size_ > 1)
00046     return true;
00047   return false;
00048 }

const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::operator[] ( int  i  )  const [inline]

Definition at line 26 of file EcalPseudoStripInputDigi.h.

References data_.

00026 { return data_[i]; }

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().

00027 { return data_[i]; }

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 30 of file EcalPseudoStripInputDigi.h.

References data_.

00030 { data_[i]=sam; }

void EcalPseudoStripInputDigi::setSampleValue ( int  i,
uint16_t  value 
) [inline]

Definition at line 31 of file EcalPseudoStripInputDigi.h.

References data_.

00031 { data_[i].setValue(value); }

void EcalPseudoStripInputDigi::setSize ( int  size  ) 

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 }

int EcalPseudoStripInputDigi::size ( void   )  const [inline]

Definition at line 24 of file EcalPseudoStripInputDigi.h.

References size_.

Referenced by operator<<().

00024 { return size_; }


Member Data Documentation

std::vector<EcalPseudoStripInputSample> EcalPseudoStripInputDigi::data_ [private]

Definition at line 52 of file EcalPseudoStripInputDigi.h.

Referenced by fineGrain(), operator[](), pseudoStripInput(), sample(), setSample(), and setSampleValue().

EcalTriggerElectronicsId EcalPseudoStripInputDigi::id_ [private]

Definition at line 50 of file EcalPseudoStripInputDigi.h.

Referenced by id().

const int EcalPseudoStripInputDigi::MAXSAMPLES = 20 [static]

Definition at line 33 of file EcalPseudoStripInputDigi.h.

Referenced by setSize().

int EcalPseudoStripInputDigi::size_ [private]

Definition at line 51 of file EcalPseudoStripInputDigi.h.

Referenced by isDebug(), sampleOfInterest(), setSize(), and size().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:48 2009 for CMSSW by  doxygen 1.5.4