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 ()
 
bool hasSwitchToGain1 () const
 
bool hasSwitchToGain6 () const
 
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

Definition at line 16 of file EcalDataFrame.h.

Constructor & Destructor Documentation

EcalDataFrame::EcalDataFrame ( )
inline

Definition at line 18 of file EcalDataFrame.h.

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

Definition at line 20 of file EcalDataFrame.h.

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

Definition at line 22 of file EcalDataFrame.h.

22 {}

Member Function Documentation

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

Definition at line 50 of file EcalDataFrame.h.

References m_data.

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

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

Definition at line 51 of file EcalDataFrame.h.

References m_data.

51 { return m_data;}
edm::DataFrame m_data
Definition: EcalDataFrame.h:55
bool EcalDataFrame::hasSwitchToGain1 ( ) const

Definition at line 27 of file EcalDataFrame.cc.

References EcalMgpaBitwiseGain1, m_data, and edm::DataFrame::size().

28 {
29  for(unsigned int u=0; u<m_data.size(); u++)
30  {
31  if ( ( static_cast<EcalMGPASample>(m_data[u]) ).gainId() == EcalMgpaBitwiseGain1 ) return true;
32  }
33  return false;
34 }
#define EcalMgpaBitwiseGain1
Definition: EcalDataFrame.h:10
edm::DataFrame m_data
Definition: EcalDataFrame.h:55
size_type size() const
Definition: DataFrame.h:64
bool EcalDataFrame::hasSwitchToGain6 ( ) const

Definition at line 17 of file EcalDataFrame.cc.

References EcalMgpaBitwiseGain6, m_data, and edm::DataFrame::size().

18 {
19  for(unsigned int u=0; u<m_data.size(); u++)
20  {
21  if ( ( static_cast<EcalMGPASample>(m_data[u]) ).gainId() == EcalMgpaBitwiseGain6 ) return true;
22  }
23  return false;
24 }
#define EcalMgpaBitwiseGain6
Definition: EcalDataFrame.h:9
edm::DataFrame m_data
Definition: EcalDataFrame.h:55
size_type size() const
Definition: DataFrame.h:64
DetId EcalDataFrame::id ( ) const
inline

Definition at line 24 of file EcalDataFrame.h.

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

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

24 { return m_data.id();}
edm::DataFrame m_data
Definition: EcalDataFrame.h:55
id_type id() const
Definition: DataFrame.h:61
bool EcalDataFrame::isSaturated ( ) const
inline

Definition at line 38 of file EcalDataFrame.h.

References lastUnsaturatedSample().

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

Definition at line 3 of file EcalDataFrame.cc.

References EcalMgpaBitwiseGain0, 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() == EcalMgpaBitwiseGain0 ) ++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:55
size_type size() const
Definition: DataFrame.h:64
#define EcalMgpaBitwiseGain0
Definition: EcalDataFrame.h:11
EcalMGPASample EcalDataFrame::operator[] ( int  i) const
inline

Definition at line 28 of file EcalDataFrame.h.

References i, and m_data.

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

Definition at line 41 of file EcalDataFrame.h.

Referenced by EcalCoder::analogToDigital().

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

Member Data Documentation

edm::DataFrame EcalDataFrame::m_data
private
const int EcalDataFrame::MAXSAMPLES = 10
static