CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 15 of file EcalPseudoStripInputDigi.h.

Member Typedef Documentation

For the sorted collection.

Definition at line 17 of file EcalPseudoStripInputDigi.h.

Constructor & Destructor Documentation

EcalPseudoStripInputDigi::EcalPseudoStripInputDigi ( )

Definition at line 4 of file EcalPseudoStripInputDigi.cc.

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

Definition at line 7 of file EcalPseudoStripInputDigi.cc.

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

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

33 {
34  int sample = sampleOfInterest();
35  if (sample != -1)
36  return data_[sample].fineGrain();
37  else
38  return false;
39 }
const EcalPseudoStripInputSample & sample(int i) const
std::vector< EcalPseudoStripInputSample > data_
int sampleOfInterest() const
Gets the interesting sample.
const EcalTriggerElectronicsId& EcalPseudoStripInputDigi::id ( void  ) const
inline

Definition at line 22 of file EcalPseudoStripInputDigi.h.

References id_.

Referenced by operator<<().

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

True if debug mode (# of samples > 1)

Definition at line 41 of file EcalPseudoStripInputDigi.cc.

References size_.

42 {
43  if (size_ == 1)
44  return false;
45  else if (size_ > 1)
46  return true;
47  return false;
48 }
const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::operator[] ( int  i) const
inline

Definition at line 25 of file EcalPseudoStripInputDigi.h.

References data_, and i.

25 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
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 22 of file EcalPseudoStripInputDigi.cc.

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

23 {
24  int sample = sampleOfInterest();
25  if (sample != -1)
26  return data_[sample].pseudoStripInput();
27  else
28  return -1;
29 }
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 26 of file EcalPseudoStripInputDigi.h.

References data_, and i.

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

26 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< EcalPseudoStripInputSample > data_
int EcalPseudoStripInputDigi::sampleOfInterest ( ) const

Gets the interesting sample.

Definition at line 11 of file EcalPseudoStripInputDigi.cc.

References size_.

Referenced by fineGrain(), and pseudoStripInput().

12 {
13  if (size_ == 1)
14  return 0;
15  else if (size_ == 5)
16  return 2;
17  else
18  return -1;
19 }
void EcalPseudoStripInputDigi::setSample ( int  i,
const EcalPseudoStripInputSample sam 
)
inline

Definition at line 29 of file EcalPseudoStripInputDigi.h.

References data_, and i.

Referenced by EcalElectronicsMapper::fillMaps().

29 { data_[i]=sam; }
int i
Definition: DBlmapReader.cc:9
std::vector< EcalPseudoStripInputSample > data_
void EcalPseudoStripInputDigi::setSampleValue ( int  i,
uint16_t  value 
)
inline

Definition at line 30 of file EcalPseudoStripInputDigi.h.

References data_, and i.

Referenced by DCCEETCCBlock::addTriggerPrimitivesToCollection().

30 { data_[i].setValue(value); }
int i
Definition: DBlmapReader.cc:9
std::vector< EcalPseudoStripInputSample > data_
void EcalPseudoStripInputDigi::setSize ( int  size)

Definition at line 50 of file EcalPseudoStripInputDigi.cc.

References MAXSAMPLES, size(), and size_.

Referenced by EcalElectronicsMapper::fillMaps().

50  {
51  if (size<0) size_=0;
52  else if (size>MAXSAMPLES) size_=MAXSAMPLES;
53  else size_=size;
54 }
int EcalPseudoStripInputDigi::size ( void  ) const
inline

Definition at line 23 of file EcalPseudoStripInputDigi.h.

References size_.

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

Member Data Documentation

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

Definition at line 49 of file EcalPseudoStripInputDigi.h.

Referenced by id().

const int EcalPseudoStripInputDigi::MAXSAMPLES = 20
static

Definition at line 32 of file EcalPseudoStripInputDigi.h.

Referenced by setSize().

int EcalPseudoStripInputDigi::size_
private

Definition at line 50 of file EcalPseudoStripInputDigi.h.

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