CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes
EcalDataFrame Class Reference

#include <EcalDataFrame.h>

Inheritance diagram for EcalDataFrame:
EBDataFrame EEDataFrame

Public Member Functions

 EcalDataFrame ()
 
 EcalDataFrame (edm::DataFrame const &iframe)
 
edm::DataFrame const & frame () const
 
edm::DataFrameframe ()
 
DetId id () const
 
bool isSaturated () const
 
int lastUnsaturatedSample () const
 
EcalMGPASample operator[] (int i) const
 
EcalMGPASample sample (int i) const
 
void setSample (int i, EcalMGPASample sam)
 
void setSize (int)
 
int size () const
 
virtual ~EcalDataFrame ()
 

Static Public Attributes

static const int MAXSAMPLES = 10
 

Private Attributes

edm::DataFrame m_data
 

Detailed Description

Id:
EcalDataFrame.h,v 1.7 2007/08/10 06:42:10 innocent Exp

Definition at line 15 of file EcalDataFrame.h.

Constructor & Destructor Documentation

EcalDataFrame::EcalDataFrame ( )
inline

Definition at line 17 of file EcalDataFrame.h.

17 {}
EcalDataFrame::EcalDataFrame ( edm::DataFrame const &  iframe)
inline

Definition at line 19 of file EcalDataFrame.h.

19 : m_data(iframe){}
edm::DataFrame m_data
Definition: EcalDataFrame.h:51
virtual EcalDataFrame::~EcalDataFrame ( )
inlinevirtual

Definition at line 21 of file EcalDataFrame.h.

21 {}

Member Function Documentation

edm::DataFrame const& EcalDataFrame::frame ( ) const
inline

Definition at line 46 of file EcalDataFrame.h.

References m_data.

Referenced by edm::DataMixingEMDigiWorker::putEM(), and EcalTBReadout::readOut().

46 { return m_data;}
edm::DataFrame m_data
Definition: EcalDataFrame.h:51
edm::DataFrame& EcalDataFrame::frame ( )
inline

Definition at line 47 of file EcalDataFrame.h.

References m_data.

47 { return m_data;}
edm::DataFrame m_data
Definition: EcalDataFrame.h:51
DetId EcalDataFrame::id ( void  ) const
inline

Definition at line 23 of file EcalDataFrame.h.

References edm::DataFrame::id(), and m_data.

Referenced by EEDataFrame::id(), and EBDataFrame::id().

23 { return m_data.id();}
edm::DataFrame m_data
Definition: EcalDataFrame.h:51
id_type id() const
Definition: DataFrame.h:60
bool EcalDataFrame::isSaturated ( ) const
inline

Definition at line 37 of file EcalDataFrame.h.

References lastUnsaturatedSample().

37 { return ( lastUnsaturatedSample() != -1 ); }
int lastUnsaturatedSample() const
Definition: EcalDataFrame.cc:3
int EcalDataFrame::lastUnsaturatedSample ( ) const

Definition at line 3 of file EcalDataFrame.cc.

References i, j, m_data, and edm::DataFrame::size().

Referenced by isSaturated().

4 {
5  int cnt = 0;
6  for ( size_t i = 3; i < m_data.size(); ++i ) {
7  cnt = 0;
8  for ( size_t j = i; j < (i + 5) && j < m_data.size(); ++j ) {
9  if ( ((EcalMGPASample)m_data[j]).gainId() == 0 ) ++cnt;
10  }
11  if ( cnt == 5 ) return i-1; // the last unsaturated sample
12  }
13  return -1; // no saturation found
14 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
edm::DataFrame m_data
Definition: EcalDataFrame.h:51
size_type size() const
Definition: DataFrame.h:63
EcalMGPASample EcalDataFrame::operator[] ( int  i) const
inline

Definition at line 27 of file EcalDataFrame.h.

References i, and m_data.

27 { return m_data[i];}
int i
Definition: DBlmapReader.cc:9
edm::DataFrame m_data
Definition: EcalDataFrame.h:51
EcalMGPASample EcalDataFrame::sample ( int  i) const
inline
void EcalDataFrame::setSample ( int  i,
EcalMGPASample  sam 
)
inline
void EcalDataFrame::setSize ( int  )
inline

Definition at line 40 of file EcalDataFrame.h.

Referenced by EcalCoder::analogToDigital().

40 {}
int EcalDataFrame::size ( void  ) const
inline

Member Data Documentation

edm::DataFrame EcalDataFrame::m_data
private

Definition at line 51 of file EcalDataFrame.h.

Referenced by frame(), id(), lastUnsaturatedSample(), operator[](), sample(), setSample(), and size().

const int EcalDataFrame::MAXSAMPLES = 10
static