CMS 3D CMS Logo

PFRecHitCreatorBase.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFClusterProducer_PFRecHitCreatorBase_h
2 #define RecoParticleFlow_PFClusterProducer_PFRecHitCreatorBase_h
3 
9 
19 
21 #include <memory>
22 
24 public:
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, cc));
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:
44  for (auto& qualityTest : qualityTests_)
45  qualityTest->beginEvent(event, setup);
46  }
47 
48  std::vector<std::unique_ptr<PFRecHitQTestBase> > qualityTests_;
49 };
50 
54 #endif
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
def create(alignables, pedeDump, additionalData, outputFile, config)
PFRecHitCreatorBase(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
edmplugin::PluginFactory< PFRecHitCreatorBase *(const edm::ParameterSet &, edm::ConsumesCollector &)> PFRecHitFactory
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
virtual ~PFRecHitCreatorBase()=default
virtual void importRecHits(std::unique_ptr< reco::PFRecHitCollection > &, std::unique_ptr< reco::PFRecHitCollection > &, const edm::Event &, const edm::EventSetup &)=0
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
#define get
Definition: event.py:1
virtual void init(const edm::EventSetup &es)