RecoParticleFlow
PFClusterProducer
interface
PFRecHitCreatorBase.h
Go to the documentation of this file.
1
#ifndef RecoParticleFlow_PFClusterProducer_PFRecHitCreatorBase_h
2
#define RecoParticleFlow_PFClusterProducer_PFRecHitCreatorBase_h
3
4
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
5
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
6
#include "
FWCore/Framework/interface/Event.h
"
7
#include "
FWCore/Framework/interface/EventSetup.h
"
8
#include "
FWCore/Framework/interface/ESHandle.h
"
9
10
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
11
#include "
DataFormats/ParticleFlowReco/interface/PFLayer.h
"
12
#include "
DataFormats/Math/interface/Vector3D.h
"
13
#include "
DataFormats/DetId/interface/DetId.h
"
14
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
15
#include "
FWCore/Framework/interface/ESHandle.h
"
16
#include "
FWCore/Framework/interface/EventSetup.h
"
17
#include "
DataFormats/ParticleFlowReco/interface/PFRecHit.h
"
18
#include "
DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h
"
19
20
#include "
RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTestBase.h
"
21
#include <memory>
22
23
class
PFRecHitCreatorBase
{
24
public
:
25
PFRecHitCreatorBase
() {}
26
PFRecHitCreatorBase
(
const
edm::ParameterSet
& iConfig,
edm::ConsumesCollector
& iC) {
27
std::vector<edm::ParameterSet> qTests = iConfig.
getParameter
<std::vector<edm::ParameterSet> >(
"qualityTests"
);
28
for
(
auto
& qTest : qTests) {
29
std::string
name
= qTest.getParameter<
std::string
>(
"name"
);
30
qualityTests_
.emplace_back(
PFRecHitQTestFactory::get
()->
create
(
name
, qTest));
31
}
32
}
33
virtual
~PFRecHitCreatorBase
() =
default
;
34
35
virtual
void
init
(
const
edm::EventSetup
& es) {}
36
37
virtual
void
importRecHits
(std::unique_ptr<reco::PFRecHitCollection>&,
38
std::unique_ptr<reco::PFRecHitCollection>&,
39
const
edm::Event
&,
40
const
edm::EventSetup
&) = 0;
41
42
protected
:
43
void
beginEvent
(
const
edm::Event
&
event
,
const
edm::EventSetup
&
setup
) {
44
for
(
auto
& qualityTest :
qualityTests_
)
45
qualityTest->beginEvent(
event
,
setup
);
46
}
47
48
std::vector<std::unique_ptr<PFRecHitQTestBase> >
qualityTests_
;
49
};
50
51
#include "
FWCore/PluginManager/interface/PluginFactory.h
"
52
typedef
edmplugin::PluginFactory
<
PFRecHitCreatorBase
*(
const
edm::ParameterSet
&,
edm::ConsumesCollector
&)>
53
PFRecHitFactory
;
54
#endif
PluginFactory.h
PFRecHitCreatorBase::PFRecHitCreatorBase
PFRecHitCreatorBase(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
Definition:
PFRecHitCreatorBase.h:26
PFRecHitFwd.h
MessageLogger.h
PFRecHitCreatorBase::beginEvent
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
Definition:
PFRecHitCreatorBase.h:43
ESHandle.h
PFRecHitCreatorBase
Definition:
PFRecHitCreatorBase.h:23
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition:
beamerCreator.py:44
singleTopDQM_cfi.setup
setup
Definition:
singleTopDQM_cfi.py:37
PFRecHit.h
PFLayer.h
PFRecHitCreatorBase::PFRecHitCreatorBase
PFRecHitCreatorBase()
Definition:
PFRecHitCreatorBase.h:25
PFRecHitCreatorBase::qualityTests_
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
Definition:
PFRecHitCreatorBase.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
PFRecHitCreatorBase::init
virtual void init(const edm::EventSetup &es)
Definition:
PFRecHitCreatorBase.h:35
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
PFRecHitCreatorBase::~PFRecHitCreatorBase
virtual ~PFRecHitCreatorBase()=default
edm::EventSetup
Definition:
EventSetup.h:58
get
#define get
DetId.h
Frameworkfwd.h
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
ConsumesCollector.h
ParameterSet.h
event
Definition:
event.py:1
PFRecHitCreatorBase::importRecHits
virtual void importRecHits(std::unique_ptr< reco::PFRecHitCollection > &, std::unique_ptr< reco::PFRecHitCollection > &, const edm::Event &, const edm::EventSetup &)=0
edm::Event
Definition:
Event.h:73
Vector3D.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
PFRecHitQTestBase.h
Generated for CMSSW Reference Manual by
1.8.16