CMS 3D CMS Logo

HGCalTowerMapProducer.cc
Go to the documentation of this file.
3 
6 
10 
13 
15 
16 #include <memory>
17 
19  public:
21  ~HGCalTowerMapProducer() override { }
22 
23  void beginRun(const edm::Run&,
24  const edm::EventSetup&) override;
25  void produce(edm::Event&, const edm::EventSetup&) override;
26 
27  private:
28  // inputs
31 
32  std::unique_ptr<HGCalTowerMapProcessorBase> towersMapProcess_;
33 };
34 
36 
39  input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells")))
40 {
41  //setup TowerMap parameters
42  const edm::ParameterSet& towerMapParamConfig = conf.getParameterSet("ProcessorParameters");
43  const std::string& towerMapProcessorName = towerMapParamConfig.getParameter<std::string>("ProcessorName");
44  HGCalTowerMapProcessorBase* towerMapProc = HGCalTowerMapFactory::get()->create(towerMapProcessorName, towerMapParamConfig);
45  towersMapProcess_.reset(towerMapProc);
46 
47  produces<l1t::HGCalTowerMapBxCollection>(towersMapProcess_->name());
48 }
49 
51  const edm::EventSetup& es) {
54 
55 }
56 
58 
59  // Output collections
60  auto towersMap_output = std::make_unique<l1t::HGCalTowerMapBxCollection>();
61 
62  // Input collections
64 
65  e.getByToken(input_cell_, trigCellBxColl);
66 
67  towersMapProcess_->run(trigCellBxColl, *towersMap_output, es);
68 
69  e.put(std::move(towersMap_output), towersMapProcess_->name());
70 
71 }
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
HGCalTowerMapProducer(const edm::ParameterSet &)
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void beginRun(const edm::Run &, const edm::EventSetup &) override
delete x;
Definition: CaloConfig.h:22
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
ParameterSet const & getParameterSet(std::string const &) const
HLT enums.
T get() const
Definition: EventSetup.h:68
void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
Definition: ESHandle.h:84
def move(src, dest)
Definition: eostools.py:511
T get(const Candidate &c)
Definition: component.h:55
Definition: Run.h:44