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
RecoLocalMuon
CSCSegment
src
CSCSegmentProducer.cc
Go to the documentation of this file.
1
5
#include <
RecoLocalMuon/CSCSegment/src/CSCSegmentProducer.h
>
6
#include <
RecoLocalMuon/CSCSegment/src/CSCSegmentBuilder.h
>
7
8
#include <
DataFormats/Common/interface/Handle.h
>
9
#include <
FWCore/Framework/interface/ESHandle.h
>
10
#include <
FWCore/Utilities/interface/InputTag.h
>
11
#include <
FWCore/MessageLogger/interface/MessageLogger.h
>
12
13
#include <
DataFormats/CSCRecHit/interface/CSCSegmentCollection.h
>
14
#include <
DataFormats/CSCRecHit/interface/CSCSegment.h
>
15
16
CSCSegmentProducer::CSCSegmentProducer
(
const
edm::ParameterSet
& pas) : iev(0) {
17
m_token
= consumes<CSCRecHit2DCollection>(pas.
getParameter
<
edm::InputTag
>(
"inputObjects"
));
18
m_cscGeometryToken
= esConsumes<CSCGeometry, MuonGeometryRecord>();
19
segmentBuilder_
=
new
CSCSegmentBuilder
(pas);
// pass on the PS
20
21
// register what this produces
22
produces<CSCSegmentCollection>();
23
}
24
25
CSCSegmentProducer::~CSCSegmentProducer
() {
26
LogDebug
(
"CSCSegment|CSC"
) <<
"deleting CSCSegmentBuilder after "
<<
iev
<<
" events w/csc data."
;
27
delete
segmentBuilder_
;
28
}
29
30
void
CSCSegmentProducer::produce
(
edm::Event
&
ev
,
const
edm::EventSetup
&
setup
) {
31
LogDebug
(
"CSCSegment|CSC"
) <<
"start producing segments for "
<< ++
iev
<<
"th event with csc data"
;
32
33
// find the geometry (& conditions?) for this event & cache it in the builder
34
35
edm::ESHandle<CSCGeometry>
h
=
setup
.getHandle(
m_cscGeometryToken
);
36
const
CSCGeometry
* pgeom = &*
h
;
37
segmentBuilder_
->
setGeometry
(pgeom);
38
39
// get the collection of CSCRecHit2D
40
edm::Handle<CSCRecHit2DCollection>
cscRecHits;
41
ev
.getByToken(
m_token
, cscRecHits);
42
43
// create empty collection of Segments
44
auto
oc = std::make_unique<CSCSegmentCollection>();
45
46
// fill the collection
47
segmentBuilder_
->
build
(cscRecHits.
product
(), *oc);
//@@ FILL oc
48
49
// put collection in event
50
ev
.put(
std::move
(oc));
51
}
Handle.h
CSCSegmentProducer::m_token
edm::EDGetTokenT< CSCRecHit2DCollection > m_token
Definition:
CSCSegmentProducer.h:34
CSCSegmentProducer::~CSCSegmentProducer
~CSCSegmentProducer() override
Destructor.
Definition:
CSCSegmentProducer.cc:25
MessageLogger.h
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
ESHandle.h
CSCSegmentBuilder::setGeometry
void setGeometry(const CSCGeometry *geom)
Definition:
CSCSegmentBuilder.cc:103
CSCSegmentProducer::m_cscGeometryToken
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_cscGeometryToken
Definition:
CSCSegmentProducer.h:35
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition:
L1TUtmAlgorithmRcd.h:4
CSCSegmentBuilder::build
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
Definition:
CSCSegmentBuilder.cc:61
edm::Handle< CSCRecHit2DCollection >
singleTopDQM_cfi.setup
setup
Definition:
singleTopDQM_cfi.py:37
CSCSegmentProducer::iev
int iev
Definition:
CSCSegmentProducer.h:32
CSCGeometry
Definition:
CSCGeometry.h:24
CSCSegmentProducer.h
edm::ESHandle< CSCGeometry >
CSCSegmentProducer::segmentBuilder_
CSCSegmentBuilder * segmentBuilder_
Definition:
CSCSegmentProducer.h:33
h
CSCSegmentProducer::CSCSegmentProducer
CSCSegmentProducer(const edm::ParameterSet &)
Constructor.
Definition:
CSCSegmentProducer.cc:16
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:223
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::EventSetup
Definition:
EventSetup.h:57
CSCSegmentBuilder.h
InputTag.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
CSCSegmentProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Produce the CSCSegment collection.
Definition:
CSCSegmentProducer.cc:30
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
CSCSegmentBuilder
Definition:
CSCSegmentBuilder.h:25
CSCSegment.h
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
CSCSegmentCollection.h
Generated for CMSSW Reference Manual by
1.8.16