CMS 3D CMS Logo

EcalDataFrame.cc
Go to the documentation of this file.
2 
4  int cnt = 0;
5  for (size_t i = 3; i < m_data.size(); ++i) {
6  cnt = 0;
7  for (size_t j = i; j < (i + 5) && j < m_data.size(); ++j) {
8  if (((EcalMGPASample)m_data[j]).gainId() == EcalMgpaBitwiseGain0)
9  ++cnt;
10  }
11  if (cnt == 5)
12  return i - 1; // the last unsaturated sample
13  }
14  return -1; // no saturation found
15 }
16 
18  for (unsigned int u = 0; u < m_data.size(); u++) {
19  if ((static_cast<EcalMGPASample>(m_data[u])).gainId() == EcalMgpaBitwiseGain6)
20  return true;
21  }
22  return false;
23 }
24 
26  for (unsigned int u = 0; u < m_data.size(); u++) {
27  if ((static_cast<EcalMGPASample>(m_data[u])).gainId() == EcalMgpaBitwiseGain1)
28  return true;
29  }
30  return false;
31 }
bool hasSwitchToGain1() const
bool hasSwitchToGain6() const
#define EcalMgpaBitwiseGain1
Definition: EcalDataFrame.h:10
constexpr size_type size() const
Definition: DataFrame.h:43
int lastUnsaturatedSample() const
Definition: EcalDataFrame.cc:3
#define EcalMgpaBitwiseGain6
Definition: EcalDataFrame.h:9
edm::DataFrame m_data
Definition: EcalDataFrame.h:54
#define EcalMgpaBitwiseGain0
Definition: EcalDataFrame.h:11