CMS 3D CMS Logo

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< EcalPseudoStripInputSampledata_
 
EcalTriggerElectronicsId id_
 
int size_
 

Detailed Description

Definition at line 13 of file EcalPseudoStripInputDigi.h.

Member Typedef Documentation

◆ key_type

For the sorted collection.

Definition at line 15 of file EcalPseudoStripInputDigi.h.

Constructor & Destructor Documentation

◆ EcalPseudoStripInputDigi() [1/2]

EcalPseudoStripInputDigi::EcalPseudoStripInputDigi ( )

Definition at line 3 of file EcalPseudoStripInputDigi.cc.

3 : size_(0), data_(MAXSAMPLES) {}

◆ EcalPseudoStripInputDigi() [2/2]

EcalPseudoStripInputDigi::EcalPseudoStripInputDigi ( const EcalTriggerElectronicsId id)
explicit

Definition at line 5 of file EcalPseudoStripInputDigi.cc.

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

Member Function Documentation

◆ fineGrain()

bool EcalPseudoStripInputDigi::fineGrain ( ) const

get the fine-grain bit of interesting sample

Definition at line 27 of file EcalPseudoStripInputDigi.cc.

27  {
28  int sample = sampleOfInterest();
29  if (sample != -1)
30  return data_[sample].fineGrain();
31  else
32  return false;
33 }

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

◆ id()

const EcalTriggerElectronicsId& EcalPseudoStripInputDigi::id ( ) const
inline

Definition at line 20 of file EcalPseudoStripInputDigi.h.

20 { return id_; }

References id_.

Referenced by operator<<().

◆ isDebug()

bool EcalPseudoStripInputDigi::isDebug ( ) const

True if debug mode (# of samples > 1)

Definition at line 35 of file EcalPseudoStripInputDigi.cc.

35  {
36  if (size_ == 1)
37  return false;
38  else if (size_ > 1)
39  return true;
40  return false;
41 }

References size_.

◆ operator[]()

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

Definition at line 23 of file EcalPseudoStripInputDigi.h.

23 { return data_[i]; }

References data_, and mps_fire::i.

◆ pseudoStripInput()

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.

18  {
19  int sample = sampleOfInterest();
20  if (sample != -1)
21  return data_[sample].pseudoStripInput();
22  else
23  return -1;
24 }

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

◆ sample()

const EcalPseudoStripInputSample& EcalPseudoStripInputDigi::sample ( int  i) const
inline

Definition at line 24 of file EcalPseudoStripInputDigi.h.

24 { return data_[i]; }

References data_, and mps_fire::i.

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

◆ sampleOfInterest()

int EcalPseudoStripInputDigi::sampleOfInterest ( ) const

Gets the interesting sample.

Definition at line 8 of file EcalPseudoStripInputDigi.cc.

8  {
9  if (size_ == 1)
10  return 0;
11  else if (size_ == 5)
12  return 2;
13  else
14  return -1;
15 }

References size_.

Referenced by fineGrain(), and pseudoStripInput().

◆ setSample()

void EcalPseudoStripInputDigi::setSample ( int  i,
const EcalPseudoStripInputSample sam 
)
inline

Definition at line 27 of file EcalPseudoStripInputDigi.h.

27 { data_[i] = sam; }

References data_, and mps_fire::i.

Referenced by EcalElectronicsMapper::fillMaps().

◆ setSampleValue()

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

Definition at line 28 of file EcalPseudoStripInputDigi.h.

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

References data_, and mps_fire::i.

Referenced by DCCEETCCBlock::addTriggerPrimitivesToCollection().

◆ setSize()

void EcalPseudoStripInputDigi::setSize ( int  size)

Definition at line 43 of file EcalPseudoStripInputDigi.cc.

43  {
44  if (size < 0)
45  size_ = 0;
46  else if (size > MAXSAMPLES)
47  size_ = MAXSAMPLES;
48  else
49  size_ = size;
50 }

References MAXSAMPLES, size(), and size_.

Referenced by EcalElectronicsMapper::fillMaps().

◆ size()

int EcalPseudoStripInputDigi::size ( void  ) const
inline

Member Data Documentation

◆ data_

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

◆ id_

EcalTriggerElectronicsId EcalPseudoStripInputDigi::id_
private

Definition at line 45 of file EcalPseudoStripInputDigi.h.

Referenced by id().

◆ MAXSAMPLES

const int EcalPseudoStripInputDigi::MAXSAMPLES = 20
static

Definition at line 30 of file EcalPseudoStripInputDigi.h.

Referenced by setSize().

◆ size_

int EcalPseudoStripInputDigi::size_
private

Definition at line 46 of file EcalPseudoStripInputDigi.h.

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

mps_fire.i
i
Definition: mps_fire.py:428
EcalPseudoStripInputDigi::id_
EcalTriggerElectronicsId id_
Definition: EcalPseudoStripInputDigi.h:45
EcalPseudoStripInputDigi::sampleOfInterest
int sampleOfInterest() const
Gets the interesting sample.
Definition: EcalPseudoStripInputDigi.cc:8
EcalPseudoStripInputDigi::data_
std::vector< EcalPseudoStripInputSample > data_
Definition: EcalPseudoStripInputDigi.h:47
EcalPseudoStripInputDigi::sample
const EcalPseudoStripInputSample & sample(int i) const
Definition: EcalPseudoStripInputDigi.h:24
EcalPseudoStripInputDigi::size
int size() const
Definition: EcalPseudoStripInputDigi.h:21
EcalPseudoStripInputDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition: EcalPseudoStripInputDigi.h:30
value
Definition: value.py:1
EcalPseudoStripInputDigi::size_
int size_
Definition: EcalPseudoStripInputDigi.h:46