DataFormats
HcalDigi
src
HcalTriggerPrimitiveDigi.cc
Go to the documentation of this file.
1
#include "
DataFormats/HcalDigi/interface/HcalTriggerPrimitiveDigi.h
"
2
3
HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi
() : size_(0), hcalPresamples_(0) {}
4
HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi
(
const
HcalTrigTowerDetId
&
id
)
5
: id_(
id
), size_(0), hcalPresamples_(0) {}
6
7
void
HcalTriggerPrimitiveDigi::setSize
(
int
size
) {
8
if
(
size
< 0)
9
size_
= 0;
10
else
if
(
size
>
MAXSAMPLES
)
11
size_
=
MAXSAMPLES
;
12
else
13
size_
=
size
;
14
}
15
void
HcalTriggerPrimitiveDigi::setPresamples
(
int
ps) {
16
if
(ps < 0)
17
hcalPresamples_
&= 0xFFFFFF0;
18
// else if (ps>=size_) hcalPresamples_=size_-1;
19
else
20
hcalPresamples_
|= ps & 0xF;
21
}
22
23
void
HcalTriggerPrimitiveDigi::setZSInfo
(
bool
unsuppressed,
bool
markAndPass
) {
24
if
(
markAndPass
)
25
hcalPresamples_
|= 0x10;
26
if
(unsuppressed)
27
hcalPresamples_
|= 0x20;
28
}
29
30
std::ostream&
operator<<
(std::ostream&
s
,
const
HcalTriggerPrimitiveDigi
& digi) {
31
s
<< digi.
id
() <<
" "
<< digi.
size
() <<
" samples "
<< digi.
presamples
() <<
" presamples"
;
32
if
(digi.
zsUnsuppressed
())
33
s
<<
" zsUS"
;
34
if
(digi.
zsMarkAndPass
())
35
s
<<
" zsM&P"
;
36
s
<< std::endl;
37
for
(
int
i
= 0;
i
< digi.
size
();
i
++)
38
s
<<
" "
<< digi.
sample
(
i
) << std::endl;
39
return
s
;
40
}
HcalTriggerPrimitiveDigi::size_
int size_
Definition:
HcalTriggerPrimitiveDigi.h:49
mps_fire.i
i
Definition:
mps_fire.py:355
HcalTriggerPrimitiveDigi::id
const HcalTrigTowerDetId & id() const
Definition:
HcalTriggerPrimitiveDigi.h:20
HcalTriggerPrimitiveDigi::presamples
int presamples() const
Definition:
HcalTriggerPrimitiveDigi.h:22
operator<<
std::ostream & operator<<(std::ostream &s, const HcalTriggerPrimitiveDigi &digi)
Definition:
HcalTriggerPrimitiveDigi.cc:30
HcalTriggerPrimitiveDigi::zsMarkAndPass
bool zsMarkAndPass() const
was ZS MarkAndPass?
Definition:
HcalTriggerPrimitiveDigi.h:25
HcalTriggerPrimitiveDigi::sample
const HcalTriggerPrimitiveSample & sample(int i) const
Definition:
HcalTriggerPrimitiveDigi.h:32
HcalTriggerPrimitiveDigi.h
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
DigiNZS_cff.markAndPass
markAndPass
Definition:
DigiNZS_cff.py:6
HcalTriggerPrimitiveDigi
Definition:
HcalTriggerPrimitiveDigi.h:13
HcalTriggerPrimitiveDigi::setPresamples
void setPresamples(int ps)
Definition:
HcalTriggerPrimitiveDigi.cc:15
HcalTriggerPrimitiveDigi::setZSInfo
void setZSInfo(bool unsuppressed, bool markAndPass)
Definition:
HcalTriggerPrimitiveDigi.cc:23
HcalTriggerPrimitiveDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition:
HcalTriggerPrimitiveDigi.h:45
HcalTriggerPrimitiveDigi::zsUnsuppressed
bool zsUnsuppressed() const
was ZS unsuppressed?
Definition:
HcalTriggerPrimitiveDigi.h:27
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:31
HcalTriggerPrimitiveDigi::size
int size() const
Definition:
HcalTriggerPrimitiveDigi.h:21
HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi
HcalTriggerPrimitiveDigi()
Definition:
HcalTriggerPrimitiveDigi.cc:3
HcalTriggerPrimitiveDigi::hcalPresamples_
int hcalPresamples_
Definition:
HcalTriggerPrimitiveDigi.h:50
HcalTriggerPrimitiveDigi::setSize
void setSize(int size)
Definition:
HcalTriggerPrimitiveDigi.cc:7
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
HcalTrigTowerDetId
Definition:
HcalTrigTowerDetId.h:14
Generated for CMSSW Reference Manual by
1.8.16