Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
i
int i
Definition:
DBlmapReader.cc:9
ESDataFrame::id
const ESDetId & id() const
Definition:
ESDataFrame.h:21
ESDataFrame
Definition:
ESDataFrame.h:10
edm::DataFrame
Definition:
DataFrame.h:15
MessageLogger_cff.limit
tuple limit
Definition:
MessageLogger_cff.py:11
ESDataFrame::data_
ESSample data_[MAXSAMPLES]
Definition:
ESDataFrame.h:39
ESDataFrame.h
ESDataFrame::size
int size() const
Definition:
ESDataFrame.h:23
operator<<
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition:
ALILine.cc:188
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
ESDataFrame::size_
int size_
Definition:
ESDataFrame.h:37
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
ESDetId
Definition:
ESDetId.h:14
hltrates_dqm_sourceclient-live_cfg.offset
tuple offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:81
edm::DataFrame::size
size_type size() const
Definition:
DataFrame.h:64
edm::size_
size_(0)
Definition:
OwnArray.h:181
ESSample
Definition:
ESSample.h:7
findQualityFiles.size
tuple size
Write out results.
Definition:
findQualityFiles.py:442
Generated for CMSSW Reference Manual by
1.8.5