CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Attributes

ESDataFrame Class Reference

#include <ESDataFrame.h>

List of all members.

Public Types

typedef ESDetId key_type
 For the sorted collection.

Public Member Functions

 ESDataFrame ()
 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

std::vector< ESSampledata_
ESDetId id_
int size_

Detailed Description

Definition at line 9 of file ESDataFrame.h.


Member Typedef Documentation

For the sorted collection.

Definition at line 13 of file ESDataFrame.h.


Constructor & Destructor Documentation

ESDataFrame::ESDataFrame ( )

Definition at line 3 of file ESDataFrame.cc.

                         : id_(0), 
                             size_(0),
                             data_(MAXSAMPLES)
{
}
ESDataFrame::ESDataFrame ( const ESDetId id) [explicit]

Definition at line 9 of file ESDataFrame.cc.

                                          : 
  id_(id), 
  size_(0),
  data_(MAXSAMPLES)
{
}

Member Function Documentation

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

Definition at line 22 of file ESDataFrame.h.

References data_, and i.

{ return data_[i]; }
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 16 of file ESDataFrame.cc.

References MAXSAMPLES, size(), and size_.

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

                                  {
  if (size > MAXSAMPLES) size_ = MAXSAMPLES;
  else if (size <= 0) size_=0;
  else size_ = size;
}
int ESDataFrame::size ( void  ) const [inline]

Member Data Documentation

std::vector<ESSample> ESDataFrame::data_ [private]

Definition at line 36 of file ESDataFrame.h.

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

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 setSize(), and size().