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
}
mps_fire.i
i
Definition:
mps_fire.py:428
ESDataFrame::data_
ESSample data_[MAXSAMPLES]
Definition:
ESDataFrame.h:36
ESDataFrame::ESDataFrame
ESDataFrame()
Definition:
ESDataFrame.cc:3
ESDataFrame::size
int size() const
Definition:
ESDataFrame.h:21
ESDetId
Definition:
ESDetId.h:15
ESDataFrame
Definition:
ESDataFrame.h:10
ESDataFrame.h
ESDataFrame::sample
const ESSample & sample(int i) const
Definition:
ESDataFrame.h:24
operator<<
std::ostream & operator<<(std::ostream &s, const ESDataFrame &digi)
Definition:
ESDataFrame.cc:26
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition:
ESDataFrame.h:30
ESDataFrame::setSize
void setSize(int size)
Definition:
ESDataFrame.cc:17
ESDataFrame::size_
int size_
Definition:
ESDataFrame.h:34
ESSample
Definition:
ESSample.h:7
edm::DataFrame
Definition:
DataFrame.h:15
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition:
remoteMonitoring_LED_IterMethod_cfg.py:427
hgcalPerformanceValidation.df
df
Definition:
hgcalPerformanceValidation.py:733
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:29
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:82
ESDataFrame::id
const ESDetId & id() const
Definition:
ESDataFrame.h:19
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
Generated for CMSSW Reference Manual by
1.8.16