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

Id:
EcalDataFrame.h,v 1.9 2012/01/27 15:04:40 franzoni Exp

Definition at line 17 of file EcalDataFrame.h.

Constructor & Destructor Documentation

EcalDataFrame::EcalDataFrame ( )
inline

Definition at line 19 of file EcalDataFrame.h.

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

Definition at line 21 of file EcalDataFrame.h.

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

Definition at line 23 of file EcalDataFrame.h.

23 {}

Member Function Documentation

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

Definition at line 51 of file EcalDataFrame.h.

References m_data.

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

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

Definition at line 52 of file EcalDataFrame.h.

References m_data.

52 { return m_data;}
edm::DataFrame m_data
Definition: EcalDataFrame.h:56
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:56
size_type size() const
Definition: DataFrame.h:63
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:56
size_type size() const
Definition: DataFrame.h:63
DetId EcalDataFrame::id ( void  ) const
inline

Definition at line 25 of file EcalDataFrame.h.

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

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

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

Definition at line 39 of file EcalDataFrame.h.

References lastUnsaturatedSample().

39 { 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:56
size_type size() const
Definition: DataFrame.h:63
#define EcalMgpaBitwiseGain0
Definition: EcalDataFrame.h:11
EcalMGPASample EcalDataFrame::operator[] ( int  i) const
inline

Definition at line 29 of file EcalDataFrame.h.

References i, and m_data.

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

Definition at line 42 of file EcalDataFrame.h.

Referenced by EcalCoder::analogToDigital().

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

Member Data Documentation

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