CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
EcalPseudoStripInputDigi Class Reference

#include <EcalPseudoStripInputDigi.h>

Public Types

typedef EcalTriggerElectronicsId key_type
 For the sorted collection. More...
 

Public Member Functions

 EcalPseudoStripInputDigi ()
 
 EcalPseudoStripInputDigi (const EcalTriggerElectronicsId &id)
 
bool fineGrain () const
 get the fine-grain bit of interesting sample More...
 
const EcalTriggerElectronicsIdid () const
 
bool isDebug () const
 True if debug mode (# of samples > 1) More...
 
const EcalPseudoStripInputSampleoperator[] (int i) const
 
int pseudoStripInput () const
 get the encoded/compressed Et of interesting sample More...
 
const EcalPseudoStripInputSamplesample (int i) const
 
int sampleOfInterest () const
 Gets the interesting sample. More...
 
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

Definition at line 13 of file EcalPseudoStripInputDigi.h.

Member Typedef Documentation

For the sorted collection.

Definition at line 15 of file EcalPseudoStripInputDigi.h.

Constructor & Destructor Documentation

EcalPseudoStripInputDigi::EcalPseudoStripInputDigi ( )

Definition at line 3 of file EcalPseudoStripInputDigi.cc.

3 : size_(0), data_(MAXSAMPLES) {}
std::vector< EcalPseudoStripInputSample > data_
EcalPseudoStripInputDigi::EcalPseudoStripInputDigi ( const EcalTriggerElectronicsId id)
explicit

Definition at line 5 of file EcalPseudoStripInputDigi.cc.

6  : id_(id), size_(0), data_(MAXSAMPLES) {}
EcalTriggerElectronicsId id_
std::vector< EcalPseudoStripInputSample > data_

Member Function Documentation

bool EcalPseudoStripInputDigi::fineGrain ( ) const

get the fine-grain bit of interesting sample

Definition at line 27 of file EcalPseudoStripInputDigi.cc.

References data_, sample(), and sampleOfInterest().

27  {
28  int sample = sampleOfInterest();
29  if (sample != -1)
30  return data_[sample].fineGrain();
31  else
32  return false;
33 }
const EcalPseudoStripInputSample & sample(int i) const
std::vector< EcalPseudoStripInputSample > data_
int sampleOfInterest() const
Gets the interesting sample.
const EcalTriggerElectronicsId& EcalPseudoStripInputDigi::id ( ) const
inline

Definition at line 20 of file EcalPseudoStripInputDigi.h.

References id_.

Referenced by operator<<().

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

True if debug mode (# of samples > 1)

Definition at line 35 of file EcalPseudoStripInputDigi.cc.

References size_.

35  {
36  if (size_ == 1)
37  return false;
38  else if (size_ > 1)
39  return true;
40  return false;
41 }
const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::operator[] ( int  i) const
inline

Definition at line 23 of file EcalPseudoStripInputDigi.h.

References data_, and mps_fire::i.

23 { return data_[i]; }
std::vector< EcalPseudoStripInputSample > data_
int EcalPseudoStripInputDigi::pseudoStripInput ( ) const

get the encoded/compressed Et of interesting sample

get the pseudoStrip input of interesting sample

Definition at line 18 of file EcalPseudoStripInputDigi.cc.

References data_, sample(), and sampleOfInterest().

18  {
19  int sample = sampleOfInterest();
20  if (sample != -1)
21  return data_[sample].pseudoStripInput();
22  else
23  return -1;
24 }
const EcalPseudoStripInputSample & sample(int i) const
std::vector< EcalPseudoStripInputSample > data_
int sampleOfInterest() const
Gets the interesting sample.
const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::sample ( int  i) const
inline

Definition at line 24 of file EcalPseudoStripInputDigi.h.

References data_, and mps_fire::i.

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

24 { return data_[i]; }
std::vector< EcalPseudoStripInputSample > data_
int EcalPseudoStripInputDigi::sampleOfInterest ( ) const

Gets the interesting sample.

Definition at line 8 of file EcalPseudoStripInputDigi.cc.

References size_.

Referenced by fineGrain(), and pseudoStripInput().

8  {
9  if (size_ == 1)
10  return 0;
11  else if (size_ == 5)
12  return 2;
13  else
14  return -1;
15 }
void EcalPseudoStripInputDigi::setSample ( int  i,
const EcalPseudoStripInputSample sam 
)
inline

Definition at line 27 of file EcalPseudoStripInputDigi.h.

References data_, and mps_fire::i.

Referenced by EcalElectronicsMapper::fillMaps().

27 { data_[i] = sam; }
std::vector< EcalPseudoStripInputSample > data_
void EcalPseudoStripInputDigi::setSampleValue ( int  i,
uint16_t  value 
)
inline

Definition at line 28 of file EcalPseudoStripInputDigi.h.

References data_, and mps_fire::i.

Referenced by DCCEETCCBlock::addTriggerPrimitivesToCollection().

28 { data_[i].setValue(value); }
std::vector< EcalPseudoStripInputSample > data_
void EcalPseudoStripInputDigi::setSize ( int  size)

Definition at line 43 of file EcalPseudoStripInputDigi.cc.

References MAXSAMPLES, size(), and size_.

Referenced by EcalElectronicsMapper::fillMaps().

43  {
44  if (size < 0)
45  size_ = 0;
46  else if (size > MAXSAMPLES)
47  size_ = MAXSAMPLES;
48  else
49  size_ = size;
50 }
int EcalPseudoStripInputDigi::size ( void  ) const
inline

Member Data Documentation

std::vector<EcalPseudoStripInputSample> EcalPseudoStripInputDigi::data_
private
EcalTriggerElectronicsId EcalPseudoStripInputDigi::id_
private

Definition at line 45 of file EcalPseudoStripInputDigi.h.

Referenced by id().

const int EcalPseudoStripInputDigi::MAXSAMPLES = 20
static

Definition at line 30 of file EcalPseudoStripInputDigi.h.

Referenced by setSize().

int EcalPseudoStripInputDigi::size_
private

Definition at line 46 of file EcalPseudoStripInputDigi.h.

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