DataFormats
EcalDigi
src
EcalDataFrame.cc
Go to the documentation of this file.
1
#include "
DataFormats/EcalDigi/interface/EcalDataFrame.h
"
2
3
int
EcalDataFrame::lastUnsaturatedSample
()
const
{
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
17
bool
EcalDataFrame::hasSwitchToGain6
()
const
{
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
25
bool
EcalDataFrame::hasSwitchToGain1
()
const
{
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
}
mps_fire.i
i
Definition:
mps_fire.py:428
EcalDataFrame::hasSwitchToGain6
bool hasSwitchToGain6() const
Definition:
EcalDataFrame.cc:17
EcalDataFrame.h
EcalMgpaBitwiseGain1
#define EcalMgpaBitwiseGain1
Definition:
EcalDataFrame.h:10
EcalDataFrame::lastUnsaturatedSample
int lastUnsaturatedSample() const
Definition:
EcalDataFrame.cc:3
EcalDataFrame::hasSwitchToGain1
bool hasSwitchToGain1() const
Definition:
EcalDataFrame.cc:25
EcalMGPASample
Definition:
EcalMGPASample.h:22
EcalDataFrame::m_data
edm::DataFrame m_data
Definition:
EcalDataFrame.h:54
EcalMgpaBitwiseGain6
#define EcalMgpaBitwiseGain6
Definition:
EcalDataFrame.h:9
edm::DataFrame::size
constexpr size_type size() const
Definition:
DataFrame.h:43
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
EcalMgpaBitwiseGain0
#define EcalMgpaBitwiseGain0
Definition:
EcalDataFrame.h:11
Generated for CMSSW Reference Manual by
1.8.16