Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
{
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
}
15
16
17
bool
EcalDataFrame:: hasSwitchToGain6
()
const
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
}
25
26
27
bool
EcalDataFrame:: hasSwitchToGain1
()
const
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
}
i
int i
Definition:
DBlmapReader.cc:9
EcalDataFrame::hasSwitchToGain1
bool hasSwitchToGain1() const
Definition:
EcalDataFrame.cc:27
EcalDataFrame::hasSwitchToGain6
bool hasSwitchToGain6() const
Definition:
EcalDataFrame.cc:17
EcalMGPASample
Definition:
EcalMGPASample.h:26
EcalMgpaBitwiseGain1
#define EcalMgpaBitwiseGain1
Definition:
EcalDataFrame.h:10
j
int j
Definition:
DBlmapReader.cc:9
EcalMgpaBitwiseGain6
#define EcalMgpaBitwiseGain6
Definition:
EcalDataFrame.h:9
EcalDataFrame::m_data
edm::DataFrame m_data
Definition:
EcalDataFrame.h:56
edm::DataFrame::size
size_type size() const
Definition:
DataFrame.h:63
EcalMgpaBitwiseGain0
#define EcalMgpaBitwiseGain0
Definition:
EcalDataFrame.h:11
EcalDataFrame::lastUnsaturatedSample
int lastUnsaturatedSample() const
Definition:
EcalDataFrame.cc:3
EcalDataFrame.h
Generated for CMSSW Reference Manual by
1.8.5