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 ESDetId &id)
 
 ESDataFrame (const edm::DataFrame &df)
 
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) {}
ESDetId id_
Definition: ESDataFrame.h:33

◆ ESDataFrame() [2/3]

ESDataFrame::ESDataFrame ( const ESDetId id)
explicit

Definition at line 5 of file ESDataFrame.cc.

5 : id_(id), size_(0) {}
ESDetId id_
Definition: ESDataFrame.h:33

◆ ESDataFrame() [3/3]

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

Definition at line 7 of file ESDataFrame.cc.

References data_, das-up-to-nevents::df, mps_fire::i, remoteMonitoring_LASER_era2018_cfg::limit, hltrates_dqm_sourceclient-live_cfg::offset, setSize(), and size_.

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 }
ESSample data_[MAXSAMPLES]
Definition: ESDataFrame.h:36
void setSize(int size)
Definition: ESDataFrame.cc:17
ESDetId id_
Definition: ESDataFrame.h:33

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.

References data_, and mps_fire::i.

23 { return data_[i]; }
ESSample data_[MAXSAMPLES]
Definition: ESDataFrame.h:36

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

References data_, and mps_fire::i.

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

28 { data_[i] = sam; }
ESSample data_[MAXSAMPLES]
Definition: ESDataFrame.h:36

◆ setSize()

void ESDataFrame::setSize ( int  size)

Definition at line 17 of file ESDataFrame.cc.

References MAXSAMPLES, size(), and size_.

Referenced by ESDataFrame().

17  {
18  if (size > MAXSAMPLES)
19  size_ = MAXSAMPLES;
20  else if (size <= 0)
21  size_ = 0;
22  else
23  size_ = size;
24 }
int size() const
Definition: ESDataFrame.h:21
static const int MAXSAMPLES
Definition: ESDataFrame.h:30

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