CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

For the sorted collection.

Definition at line 12 of file ESDataFrame.h.

Constructor & Destructor Documentation

ESDataFrame::ESDataFrame ( )

Definition at line 3 of file ESDataFrame.cc.

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

Definition at line 7 of file ESDataFrame.cc.

References data_, mps_fire::i, MessageLogger_cff::limit, hltrates_dqm_sourceclient-live_cfg::offset, setSize(), edm::DataFrame::size(), 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
constexpr id_type id() const
Definition: DataFrame.h:41
void setSize(int size)
Definition: ESDataFrame.cc:17
constexpr size_type size() const
Definition: DataFrame.h:43
ESDetId id_
Definition: ESDataFrame.h:33

Member Function Documentation

const ESDetId& ESDataFrame::id ( ) const
inline
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
const ESSample& ESDataFrame::sample ( int  i) const
inline
void ESDataFrame::setSample ( int  i,
const ESSample sam 
)
inline
void ESDataFrame::setSize ( int  size)

Definition at line 17 of file ESDataFrame.cc.

References MAXSAMPLES, size(), and size_.

Referenced by ESElectronicsSim::analogToDigital(), ESElectronicsSimFast::analogToDigital(), ESDataFrame(), and ESUnpacker::word2digi().

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
int ESDataFrame::size ( void  ) const
inline

Member Data Documentation

ESSample ESDataFrame::data_[MAXSAMPLES]
private

Definition at line 36 of file ESDataFrame.h.

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

ESDetId ESDataFrame::id_
private

Definition at line 33 of file ESDataFrame.h.

Referenced by id().

const int ESDataFrame::MAXSAMPLES = 3
static
int ESDataFrame::size_
private

Definition at line 34 of file ESDataFrame.h.

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