RecoParticleFlow
PFClusterProducer
plugins
PFClusterCollectionMerger.cc
Go to the documentation of this file.
1
#ifndef __PFClusterCollectionMerger__
2
#define __PFClusterCollectionMerger__
3
4
// user include files
5
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
6
#include "
FWCore/Framework/interface/global/EDProducer.h
"
7
8
#include "
FWCore/Framework/interface/Event.h
"
9
#include "
FWCore/Framework/interface/MakerMacros.h
"
10
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
13
#include "
DataFormats/ParticleFlowReco/interface/PFCluster.h
"
14
#include "
DataFormats/ParticleFlowReco/interface/PFClusterFwd.h
"
15
16
class
PFClusterCollectionMerger
:
public
edm::global::EDProducer
<> {
17
public
:
18
PFClusterCollectionMerger
(
const
edm::ParameterSet
& conf) {
19
const
std::vector<edm::InputTag>&
inputs
= conf.
getParameter
<std::vector<edm::InputTag> >(
"inputs"
);
20
for
(
const
auto
&
input
:
inputs
) {
21
_inputs
.push_back(consumes<reco::PFClusterCollection>(
input
));
22
}
23
produces<reco::PFClusterCollection>();
24
}
25
26
void
produce
(
edm::StreamID
,
edm::Event
&
e
,
const
edm::EventSetup
& es)
const override
{
27
auto
output
= std::make_unique<reco::PFClusterCollection>();
28
for
(
const
auto
&
input
:
_inputs
) {
29
edm::Handle<reco::PFClusterCollection>
handle
;
30
e
.getByToken(
input
,
handle
);
31
output
->insert(
output
->end(),
handle
->begin(),
handle
->end());
32
}
33
e
.put(
std::move
(
output
));
34
}
35
36
private
:
37
std::vector<edm::EDGetTokenT<reco::PFClusterCollection> >
_inputs
;
38
};
39
40
DEFINE_FWK_MODULE
(
PFClusterCollectionMerger
);
41
42
#endif
edm::StreamID
Definition:
StreamID.h:30
input
static const std::string input
Definition:
EdmProvDump.cc:48
PFClusterCollectionMerger::produce
void produce(edm::StreamID, edm::Event &e, const edm::EventSetup &es) const override
Definition:
PFClusterCollectionMerger.cc:26
convertSQLitetoXML_cfg.output
output
Definition:
convertSQLitetoXML_cfg.py:72
patZpeak.handle
handle
Definition:
patZpeak.py:23
edm::Handle
Definition:
AssociativeIterator.h:50
PFClusterCollectionMerger::PFClusterCollectionMerger
PFClusterCollectionMerger(const edm::ParameterSet &conf)
Definition:
PFClusterCollectionMerger.cc:18
PFClusterCollectionMerger
Definition:
PFClusterCollectionMerger.cc:16
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
PFCluster.h
PFClusterCollectionMerger::_inputs
std::vector< edm::EDGetTokenT< reco::PFClusterCollection > > _inputs
Definition:
PFClusterCollectionMerger.cc:37
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
PFClusterFwd.h
PixelMapPlotter.inputs
inputs
Definition:
PixelMapPlotter.py:490
edm::EventSetup
Definition:
EventSetup.h:57
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Frameworkfwd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
ParameterSet.h
EDProducer.h
edm::Event
Definition:
Event.h:73
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16