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) {}
std::vector< EcalPseudoStripInputSample > data_

◆ EcalPseudoStripInputDigi() [2/2]

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

◆ fineGrain()

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 }
int sampleOfInterest() const
Gets the interesting sample.
std::vector< EcalPseudoStripInputSample > data_
const EcalPseudoStripInputSample & sample(int i) const

◆ id()

const EcalTriggerElectronicsId& EcalPseudoStripInputDigi::id ( ) const
inline

Definition at line 20 of file EcalPseudoStripInputDigi.h.

References id_.

Referenced by operator<<().

20 { return id_; }
EcalTriggerElectronicsId id_

◆ isDebug()

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 }

◆ operator[]()

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_

◆ 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.

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 }
int sampleOfInterest() const
Gets the interesting sample.
std::vector< EcalPseudoStripInputSample > data_
const EcalPseudoStripInputSample & sample(int i) const

◆ 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_

◆ sampleOfInterest()

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 }

◆ setSample()

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_

◆ setSampleValue()

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); }
Definition: value.py:1
std::vector< EcalPseudoStripInputSample > data_

◆ setSize()

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 }

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