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 
4 
5 
11 
12 
22 
24 #include <memory>
25 
26 
28  public:
31  std::vector<edm::ParameterSet> qTests = iConfig.getParameter<std::vector<edm::ParameterSet> >("qualityTests");
32  for (unsigned int i=0;i<qTests.size();++i) {
33  std::string name = qTests.at(i).getParameter<std::string>("name");
34  qualityTests_.emplace_back(PFRecHitQTestFactory::get()->create(name,qTests.at(i)));
35  }
36  }
37  virtual ~PFRecHitCreatorBase() = default;
38 
39  virtual void init(const edm::EventSetup &es) { }
40 
41  virtual void importRecHits(std::unique_ptr<reco::PFRecHitCollection>&,std::unique_ptr<reco::PFRecHitCollection>& ,const edm::Event&,const edm::EventSetup&)=0;
42 
43  protected:
44 
46  for (unsigned int i=0;i<qualityTests_.size();++i)
47  qualityTests_[i]->beginEvent(event,setup);
48  }
49 
50 
51  std::vector<std::unique_ptr<PFRecHitQTestBase> > qualityTests_;
52 
53 };
54 
55 
58 #endif
T getParameter(std::string const &) const
std::vector< std::unique_ptr< PFRecHitQTestBase > > qualityTests_
def create(alignables, pedeDump, additionalData, outputFile, config)
virtual ~PFRecHitCreatorBase()=default
virtual void importRecHits(std::unique_ptr< reco::PFRecHitCollection > &, std::unique_ptr< reco::PFRecHitCollection > &, const edm::Event &, const edm::EventSetup &)=0
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
PFRecHitCreatorBase(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
void beginEvent(const edm::Event &event, const edm::EventSetup &setup)
edmplugin::PluginFactory< PFRecHitCreatorBase *(const edm::ParameterSet &, edm::ConsumesCollector &)> PFRecHitFactory
T get(const Candidate &c)
Definition: component.h:55
Definition: event.py:1
virtual void init(const edm::EventSetup &es)