Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
DataFormats
CSCDigi
src
CSCWireDigi.cc
Go to the documentation of this file.
1
7
#include "
DataFormats/CSCDigi/interface/CSCWireDigi.h
"
8
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
9
#include <iostream>
10
#include <cstdint>
11
13
14
CSCWireDigi::CSCWireDigi
(
int
wire,
unsigned
int
tbinb) {
16
wire_
= wire & 0x0000FFFF;
17
tbinb_
= tbinb;
19
wireBX_
= (wire >> 16) & 0x0000FFFF;
21
wireBXandWires_
= wire;
22
}
23
25
CSCWireDigi::CSCWireDigi
() {
26
wire_
= 0;
27
tbinb_
= 0;
28
wireBX_
= 0;
29
wireBXandWires_
= 0;
30
}
31
33
int
CSCWireDigi::getBeamCrossingTag
()
const
{
return
getTimeBin
(); }
35
int
CSCWireDigi::getTimeBin
()
const
{
36
uint32_t tbit = 1;
37
int
tbin = -1;
38
for
(
int
i
= 0;
i
< 32;
i
++) {
39
if
(tbit &
tbinb_
)
40
tbin =
i
;
41
if
(tbin > -1)
42
break
;
43
tbit = tbit << 1;
44
}
45
return
tbin;
46
}
48
std::vector<int>
CSCWireDigi::getTimeBinsOn
()
const
{
49
std::vector<int> tbins;
50
uint32_t tbit =
tbinb_
;
51
uint32_t
one
= 1;
52
for
(
int
i
= 0;
i
< 32;
i
++) {
53
if
(tbit &
one
)
54
tbins.push_back(
i
);
55
tbit = tbit >> 1;
56
if
(tbit == 0)
57
break
;
58
}
59
return
tbins;
60
}
61
63
64
void
CSCWireDigi::print
()
const
{
65
std::ostringstream ost;
66
ost <<
"CSCWireDigi | wg "
<<
getWireGroup
() <<
" | "
67
<<
" BX # "
<<
getWireGroupBX
() <<
" | "
68
<<
" BX + Wire "
<< std::hex <<
getBXandWireGroup
() <<
" | "
<<
std::dec
<<
" First Time Bin On "
<<
getTimeBin
()
69
<<
" | Time Bins On "
;
70
std::vector<int> tbins =
getTimeBinsOn
();
71
std::copy
(tbins.begin(), tbins.end(), std::ostream_iterator<int>(ost,
" "
));
72
edm::LogVerbatim
(
"CSCDigi"
) << ost.str();
73
}
74
75
std::ostream&
operator<<
(std::ostream&
o
,
const
CSCWireDigi
& digi) {
76
o
<<
" CSCWireDigi wg: "
<< digi.
getWireGroup
() <<
", First Time Bin On: "
<< digi.
getTimeBin
() <<
", Time Bins On: "
;
77
std::vector<int> tbins = digi.
getTimeBinsOn
();
78
std::copy
(tbins.begin(), tbins.end(), std::ostream_iterator<int>(
o
,
" "
));
79
return
o
;
80
}
mps_fire.i
i
Definition:
mps_fire.py:428
SiPixelPI::one
Definition:
SiPixelPayloadInspectorHelper.h:39
MessageLogger.h
filterCSVwithJSON.copy
copy
Definition:
filterCSVwithJSON.py:36
CSCWireDigi::tbinb_
uint32_t tbinb_
Definition:
CSCWireDigi.h:45
CSCWireDigi::wireBX_
int wireBX_
Definition:
CSCWireDigi.h:48
CSCWireDigi::getWireGroup
int getWireGroup() const
default
Definition:
CSCWireDigi.h:22
CSCWireDigi.h
operator<<
std::ostream & operator<<(std::ostream &o, const CSCWireDigi &digi)
Definition:
CSCWireDigi.cc:75
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:42
CSCWireDigi::getWireGroupBX
int getWireGroupBX() const
return BX assigned for the wire group (16 upper bits from the wire group number)
Definition:
CSCWireDigi.h:24
CSCWireDigi::wireBXandWires_
int wireBXandWires_
BX in the wire digis (16 upper bits from the wire group number)
Definition:
CSCWireDigi.h:47
CSCWireDigi::getTimeBinsOn
std::vector< int > getTimeBinsOn() const
return vector of time bins ON
Definition:
CSCWireDigi.cc:48
CSCWireDigi::getTimeBin
int getTimeBin() const
return first tbin ON number
Definition:
CSCWireDigi.cc:35
CSCWireDigi
Definition:
CSCWireDigi.h:14
CSCWireDigi::wire_
int wire_
Definition:
CSCWireDigi.h:44
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
CSCWireDigi::getBeamCrossingTag
int getBeamCrossingTag() const
return tbin number, (obsolete, use getTimeBin() instead)
Definition:
CSCWireDigi.cc:33
CSCWireDigi::CSCWireDigi
CSCWireDigi()
wiregroup#, tbin bit word
Definition:
CSCWireDigi.cc:25
CSCWireDigi::print
void print() const
Print content of digi.
Definition:
CSCWireDigi.cc:64
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:142
CSCWireDigi::getBXandWireGroup
int getBXandWireGroup() const
Definition:
CSCWireDigi.h:27
Generated for CMSSW Reference Manual by
1.8.16