CMS 3D CMS Logo

Public Member Functions | Static Public Attributes | Private Attributes

EcalDataFrame Class Reference

#include <EcalDataFrame.h>

Inheritance diagram for EcalDataFrame:
EBDataFrame EEDataFrame

List of all members.

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.8 2009/03/27 16:29:55 ferriff Exp

Definition at line 15 of file EcalDataFrame.h.


Constructor & Destructor Documentation

EcalDataFrame::EcalDataFrame ( ) [inline]

Definition at line 17 of file EcalDataFrame.h.

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

Definition at line 19 of file EcalDataFrame.h.

: m_data(iframe){} 
virtual EcalDataFrame::~EcalDataFrame ( ) [inline, virtual]

Definition at line 21 of file EcalDataFrame.h.

{} 

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

{ return m_data;}
edm::DataFrame& EcalDataFrame::frame ( ) [inline]

Definition at line 47 of file EcalDataFrame.h.

References m_data.

{ return m_data;}
DetId EcalDataFrame::id ( void  ) const [inline]

Reimplemented in EBDataFrame, and EEDataFrame.

Definition at line 23 of file EcalDataFrame.h.

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

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

{ return m_data.id();}
bool EcalDataFrame::isSaturated ( ) const [inline]

Definition at line 37 of file EcalDataFrame.h.

References lastUnsaturatedSample().

{ return ( lastUnsaturatedSample() != -1 ); }
int EcalDataFrame::lastUnsaturatedSample ( ) const

Definition at line 3 of file EcalDataFrame.cc.

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

Referenced by isSaturated().

{
        int cnt = 0;
        for ( size_t i = 3; i < m_data.size(); ++i ) {
                cnt = 0;
                for ( size_t j = i; j < (i + 5) && j < m_data.size(); ++j ) {
                        if ( ((EcalMGPASample)m_data[j]).gainId() == 0 ) ++cnt;
                }
                if ( cnt == 5 ) return i-1; // the last unsaturated sample
        }
        return -1; // no saturation found
}
EcalMGPASample EcalDataFrame::operator[] ( int  i) const [inline]

Definition at line 27 of file EcalDataFrame.h.

References i, and m_data.

{ return m_data[i];}
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().

{}
int EcalDataFrame::size ( void  ) const [inline]

Member Data Documentation

Definition at line 51 of file EcalDataFrame.h.

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

const int EcalDataFrame::MAXSAMPLES = 10 [static]