CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 14 of file ESDataFrame.h.

Constructor & Destructor Documentation

ESDataFrame::ESDataFrame ( )

Definition at line 3 of file ESDataFrame.cc.

3  : id_(0),
4  size_(0)
5 {
6 }
ESDetId id_
Definition: ESDataFrame.h:36
ESDataFrame::ESDataFrame ( const ESDetId id)
explicit

Definition at line 8 of file ESDataFrame.cc.

8  :
9  id_(id),
10  size_(0)
11 {
12 }
ESDetId id_
Definition: ESDataFrame.h:36
ESDataFrame::ESDataFrame ( const edm::DataFrame df)

Definition at line 14 of file ESDataFrame.cc.

References data_, i, MessageLogger_cff::limit, hltrates_dqm_sourceclient-live_cfg::offset, setSize(), edm::DataFrame::size(), and size_.

14  :
15  id_ ( df.id() )
16 {
17  setSize( df.size() ) ;
18  for( int i ( 0 ) ; i != size_ ; ++i )
19  {
20  static const int offset ( 65536 ) ; // for uint16 to int16
21  static const uint16_t limit ( 32767 ) ;
22  const int dint ( limit < df[i] ? (int)df[i] - offset : df[i] ) ;
23  data_[i] = ESSample( (int16_t)dint ) ;
24  }
25 }
int i
Definition: DBlmapReader.cc:9
ESSample data_[MAXSAMPLES]
Definition: ESDataFrame.h:39
void setSize(int size)
Definition: ESDataFrame.cc:27
ESDetId id_
Definition: ESDataFrame.h:36
size_type size() const
Definition: DataFrame.h:63
id_type id() const
Definition: DataFrame.h:60

Member Function Documentation

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

Definition at line 25 of file ESDataFrame.h.

References data_, and i.

25 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
ESSample data_[MAXSAMPLES]
Definition: ESDataFrame.h:39
const ESSample& ESDataFrame::sample ( int  i) const
inline
void ESDataFrame::setSample ( int  i,
const ESSample sam 
)
inline

Definition at line 30 of file ESDataFrame.h.

References data_, and i.

Referenced by ESElectronicsSim::analogToDigital(), ESElectronicsSimFast::analogToDigital(), edm::DataMixingEMDigiWorker::putEM(), and ESUnpacker::word2digi().

30 { data_[i] = sam; }
int i
Definition: DBlmapReader.cc:9
ESSample data_[MAXSAMPLES]
Definition: ESDataFrame.h:39
void ESDataFrame::setSize ( int  size)

Definition at line 27 of file ESDataFrame.cc.

References MAXSAMPLES, size(), and size_.

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

27  {
29  else if (size <= 0) size_=0;
30  else size_ = size;
31 }
int size() const
Definition: ESDataFrame.h:23
static const int MAXSAMPLES
Definition: ESDataFrame.h:32
int ESDataFrame::size ( void  ) const
inline

Member Data Documentation

ESSample ESDataFrame::data_[MAXSAMPLES]
private

Definition at line 39 of file ESDataFrame.h.

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

ESDetId ESDataFrame::id_
private

Definition at line 36 of file ESDataFrame.h.

Referenced by id().

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

Definition at line 37 of file ESDataFrame.h.

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