src
DataFormats
EcalDigi
src
ESDataFrame.cc
Go to the documentation of this file.
1
#include "
DataFormats/EcalDigi/interface/ESDataFrame.h
"
2
3
ESDataFrame::ESDataFrame
() : id_(0), size_(0) {}
4
5
ESDataFrame::ESDataFrame
(
const
ESDetId
&
id
) : id_(
id
), size_(0) {}
6
7
ESDataFrame::ESDataFrame
(
const
edm::DataFrame
&
df
) : id_(
df
.
id
()) {
8
setSize
(
df
.size());
9
for
(
int
i
(0);
i
!=
size_
; ++
i
) {
10
static
const
int
offset
(65536);
// for uint16 to int16
11
static
const
uint16_t
limit
(32767);
12
const
int
dint(
limit
<
df
[
i
] ? (
int
)
df
[
i
] -
offset
:
df
[
i
]);
13
data_
[
i
] =
ESSample
((int16_t)dint);
14
}
15
}
16
17
void
ESDataFrame::setSize
(
int
size
) {
18
if
(
size
>
MAXSAMPLES
)
19
size_
=
MAXSAMPLES
;
20
else
if
(
size
<= 0)
21
size_
= 0;
22
else
23
size_
=
size
;
24
}
25
26
std::ostream&
operator<<
(std::ostream&
s
,
const
ESDataFrame
& digi) {
27
s
<< digi.
id
() <<
" "
<< digi.
size
() <<
" samples "
<< std::endl;
28
for
(
int
i
= 0;
i
< digi.
size
();
i
++)
29
s
<<
" "
<< digi.
sample
(
i
) << std::endl;
30
return
s
;
31
}
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
ESDataFrame::ESDataFrame
ESDataFrame()
Definition:
ESDataFrame.cc:3
ESDataFrame::id
const ESDetId & id() const
Definition:
ESDataFrame.h:19
mps_fire.i
i
Definition:
mps_fire.py:429
ESDataFrame::size
int size() const
Definition:
ESDataFrame.h:21
ESDataFrame
Definition:
ESDataFrame.h:10
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
edm::DataFrame
Definition:
DataFrame.h:15
ESDataFrame::data_
ESSample data_[MAXSAMPLES]
Definition:
ESDataFrame.h:36
ESDataFrame.h
l1ctLayer2EG_cff.id
id
Definition:
l1ctLayer2EG_cff.py:85
remoteMonitoring_LASER_era2018_cfg.limit
limit
Definition:
remoteMonitoring_LASER_era2018_cfg.py:583
ESDataFrame::sample
const ESSample & sample(int i) const
Definition:
ESDataFrame.h:24
ESDataFrame::setSize
void setSize(int size)
Definition:
ESDataFrame.cc:17
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition:
ESDataFrame.h:30
hgcalPerformanceValidation.df
df
Definition:
hgcalPerformanceValidation.py:870
ESDataFrame::size_
int size_
Definition:
ESDataFrame.h:34
operator<<
std::ostream & operator<<(std::ostream &s, const ESDataFrame &digi)
Definition:
ESDataFrame.cc:26
ESDetId
Definition:
ESDetId.h:15
ESSample
Definition:
ESSample.h:7
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:83
Generated for CMSSW Reference Manual by
1.8.14