CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Attributes

EcalPseudoStripInputDigi Class Reference

#include <EcalPseudoStripInputDigi.h>

List of all members.

Public Types

typedef EcalTriggerElectronicsId key_type
 For the sorted collection.

Public Member Functions

 EcalPseudoStripInputDigi ()
 EcalPseudoStripInputDigi (const EcalTriggerElectronicsId &id)
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

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.

                                                   : size_(0), data_(MAXSAMPLES) {
}
EcalPseudoStripInputDigi::EcalPseudoStripInputDigi ( const EcalTriggerElectronicsId id) [explicit]

Definition at line 7 of file EcalPseudoStripInputDigi.cc.

                                                                                     : id_(id),
                                                                                   size_(0), data_(MAXSAMPLES) {
}

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

{ 
  int sample = sampleOfInterest();
  if (sample != -1)
    return data_[sample].fineGrain();
  else
    return false;
}
const EcalTriggerElectronicsId& EcalPseudoStripInputDigi::id ( void  ) const [inline]

Definition at line 23 of file EcalPseudoStripInputDigi.h.

References id_.

Referenced by operator<<().

{ return id_; }
bool EcalPseudoStripInputDigi::isDebug ( ) const

True if debug mode (# of samples > 1)

Definition at line 41 of file EcalPseudoStripInputDigi.cc.

References size_.

{
  if (size_ == 1)
    return false;
  else if (size_ > 1)
    return true;
  return false;
}
const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::operator[] ( int  i) const [inline]

Definition at line 26 of file EcalPseudoStripInputDigi.h.

References data_, and i.

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

{
  int sample = sampleOfInterest();
  if (sample != -1)
    return data_[sample].pseudoStripInput();
  else
    return -1;
}
const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::sample ( int  i) const [inline]

Definition at line 27 of file EcalPseudoStripInputDigi.h.

References data_, and i.

Referenced by fineGrain(), operator<<(), and pseudoStripInput().

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

{
  if (size_ == 1)
    return 0;
  else if (size_ == 5)
    return 2;
  else
    return -1;
} 
void EcalPseudoStripInputDigi::setSample ( int  i,
const EcalPseudoStripInputSample sam 
) [inline]

Definition at line 30 of file EcalPseudoStripInputDigi.h.

References data_, and i.

Referenced by EcalElectronicsMapper::fillMaps().

{ data_[i]=sam; }
void EcalPseudoStripInputDigi::setSampleValue ( int  i,
uint16_t  value 
) [inline]

Definition at line 31 of file EcalPseudoStripInputDigi.h.

References data_, and i.

Referenced by DCCEETCCBlock::addTriggerPrimitivesToCollection().

{ data_[i].setValue(value); }
void EcalPseudoStripInputDigi::setSize ( int  size)

Definition at line 50 of file EcalPseudoStripInputDigi.cc.

References MAXSAMPLES, size(), and size_.

Referenced by EcalElectronicsMapper::fillMaps().

                                               {
  if (size<0) size_=0;
  else if (size>MAXSAMPLES) size_=MAXSAMPLES;
  else size_=size;
}
int EcalPseudoStripInputDigi::size ( void  ) const [inline]

Definition at line 24 of file EcalPseudoStripInputDigi.h.

References size_.

Referenced by operator<<(), and setSize().

{ return size_; }

Member Data Documentation

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

Definition at line 51 of file EcalPseudoStripInputDigi.h.

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