CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
ESDataFrame Class Reference

#include <ESDataFrame.h>

Public Types

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

Public Member Functions

 ESDataFrame ()
 
 ESDataFrame (const edm::DataFrame &df)
 
 ESDataFrame (const ESDetId &id)
 
const ESDetIdid () const
 
const ESSampleoperator[] (int i) const
 
const ESSamplesample (int i) const
 
void setSample (int i, const ESSample &sam)
 
void setSize (int size)
 
int size () const
 

Static Public Attributes

static const int MAXSAMPLES = 3
 

Private Attributes

ESSample data_ [MAXSAMPLES]
 
ESDetId id_
 
int size_
 

Detailed Description

Definition at line 10 of file ESDataFrame.h.

Member Typedef Documentation

◆ key_type

For the sorted collection.

Definition at line 12 of file ESDataFrame.h.

Constructor & Destructor Documentation

◆ ESDataFrame() [1/3]

ESDataFrame::ESDataFrame ( )

Definition at line 3 of file ESDataFrame.cc.

3 : id_(0), size_(0) {}

◆ ESDataFrame() [2/3]

ESDataFrame::ESDataFrame ( const ESDetId id)
explicit

Definition at line 5 of file ESDataFrame.cc.

5 : id_(id), size_(0) {}

◆ ESDataFrame() [3/3]

ESDataFrame::ESDataFrame ( const edm::DataFrame df)

Definition at line 7 of file ESDataFrame.cc.

7  : id_(df.id()) {
8  setSize(df.size());
9  for (int i(0); i != size_; ++i) {
10  static const int offset(65536); // for uint16 to int16
11  static const uint16_t limit(32767);
12  const int dint(limit < df[i] ? (int)df[i] - offset : df[i]);
13  data_[i] = ESSample((int16_t)dint);
14  }
15 }

References data_, hgcalPerformanceValidation::df, mps_fire::i, remoteMonitoring_LED_IterMethod_cfg::limit, hltrates_dqm_sourceclient-live_cfg::offset, setSize(), and size_.

Member Function Documentation

◆ id()

const ESDetId& ESDataFrame::id ( ) const
inline

◆ operator[]()

const ESSample& ESDataFrame::operator[] ( int  i) const
inline

Definition at line 23 of file ESDataFrame.h.

23 { return data_[i]; }

References data_, and mps_fire::i.

◆ sample()

const ESSample& ESDataFrame::sample ( int  i) const
inline

◆ setSample()

void ESDataFrame::setSample ( int  i,
const ESSample sam 
)
inline

Definition at line 28 of file ESDataFrame.h.

28 { data_[i] = sam; }

References data_, and mps_fire::i.

Referenced by edm::DataMixingEMDigiWorker::putEM().

◆ setSize()

void ESDataFrame::setSize ( int  size)

Definition at line 17 of file ESDataFrame.cc.

17  {
18  if (size > MAXSAMPLES)
19  size_ = MAXSAMPLES;
20  else if (size <= 0)
21  size_ = 0;
22  else
23  size_ = size;
24 }

References MAXSAMPLES, size(), and size_.

Referenced by ESDataFrame().

◆ size()

int ESDataFrame::size ( void  ) const
inline

Member Data Documentation

◆ data_

ESSample ESDataFrame::data_[MAXSAMPLES]
private

Definition at line 36 of file ESDataFrame.h.

Referenced by ESDataFrame(), operator[](), sample(), and setSample().

◆ id_

ESDetId ESDataFrame::id_
private

Definition at line 33 of file ESDataFrame.h.

Referenced by id().

◆ MAXSAMPLES

const int ESDataFrame::MAXSAMPLES = 3
static

◆ size_

int ESDataFrame::size_
private

Definition at line 34 of file ESDataFrame.h.

Referenced by ESDataFrame(), setSize(), and size().

mps_fire.i
i
Definition: mps_fire.py:428
ESDataFrame::data_
ESSample data_[MAXSAMPLES]
Definition: ESDataFrame.h:36
ESDataFrame::size
int size() const
Definition: ESDataFrame.h:21
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
ESDataFrame::setSize
void setSize(int size)
Definition: ESDataFrame.cc:17
ESDataFrame::size_
int size_
Definition: ESDataFrame.h:34
ESSample
Definition: ESSample.h:7
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:640
ESDataFrame::id_
ESDetId id_
Definition: ESDataFrame.h:33
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82