Main Page
Namespaces
Classes
Package Documentation
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),
4
size_(0)
5
{
6
}
7
8
ESDataFrame::ESDataFrame
(
const
ESDetId
&
id
) :
9
id_
(id),
10
size_
(0)
11
{
12
}
13
14
ESDataFrame::ESDataFrame
(
const
edm::DataFrame
& df) :
15
id_
( df.
id
() )
16
{
17
setSize
( df.
size
() ) ;
18
for
(
int
i
( 0 ) ;
i
!=
size_
; ++
i
)
19
{
20
static
const
int
offset
( 65536 ) ;
// for uint16 to int16
21
static
const
uint16_t
limit
( 32767 ) ;
22
const
int
dint ( limit < df[
i
] ? (
int
)df[
i
] - offset : df[
i
] ) ;
23
data_
[
i
] =
ESSample
( (int16_t)dint ) ;
24
}
25
}
26
27
void
ESDataFrame::setSize
(
int
size
) {
28
if
(size >
MAXSAMPLES
)
size_
=
MAXSAMPLES
;
29
else
if
(size <= 0)
size_
=0;
30
else
size_
=
size
;
31
}
32
33
std::ostream&
operator<<
(std::ostream&
s
,
const
ESDataFrame
& digi) {
34
s << digi.
id
() <<
" "
<< digi.
size
()
35
<<
" samples "
<< std::endl;
36
for
(
int
i
=0;
i
<digi.
size
();
i
++)
37
s <<
" "
<< digi.
sample
(
i
) << std::endl;
38
return
s
;
39
}
ESDataFrame::ESDataFrame
ESDataFrame()
Definition:
ESDataFrame.cc:3
mps_fire.i
i
Definition:
mps_fire.py:269
ESDataFrame::id
const ESDetId & id() const
Definition:
ESDataFrame.h:21
ESDataFrame
Definition:
ESDataFrame.h:10
alignCSCRings.s
s
Definition:
alignCSCRings.py:91
edm::DataFrame
Definition:
DataFrame.h:15
ESDataFrame::data_
ESSample data_[MAXSAMPLES]
Definition:
ESDataFrame.h:39
ESDataFrame.h
ESDataFrame::size
int size() const
Definition:
ESDataFrame.h:23
ESDataFrame::setSize
void setSize(int size)
Definition:
ESDataFrame.cc:27
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition:
ESDataFrame.h:32
ESDataFrame::sample
const ESSample & sample(int i) const
Definition:
ESDataFrame.h:26
MessageLogger_cfi.limit
limit
Definition:
MessageLogger_cfi.py:7
ESDataFrame::size_
int size_
Definition:
ESDataFrame.h:37
PFRecoTauDiscriminationByIsolation_cfi.offset
offset
Definition:
PFRecoTauDiscriminationByIsolation_cfi.py:61
operator<<
std::ostream & operator<<(std::ostream &s, const ESDataFrame &digi)
Definition:
ESDataFrame.cc:33
ESDetId
Definition:
ESDetId.h:15
ESDataFrame::id_
ESDetId id_
Definition:
ESDataFrame.h:36
edm::DataFrame::size
size_type size() const
Definition:
DataFrame.h:64
ESSample
Definition:
ESSample.h:7
Generated for CMSSW Reference Manual by
1.8.11