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

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

Definition at line 8 of file ESDataFrame.cc.

                                          : 
  id_(id), 
  size_(0)
{
}
ESDataFrame::ESDataFrame ( const edm::DataFrame df)

Definition at line 14 of file ESDataFrame.cc.

References data_, i, MessageLogger_cff::limit, evf::evtn::offset(), setSize(), edm::DataFrame::size(), and size_.

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

Member Function Documentation

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

Definition at line 25 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)
int ESDataFrame::size ( void  ) const [inline]

Member Data Documentation

Definition at line 39 of file ESDataFrame.h.

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

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