CMS 3D CMS Logo

HGCalBackendLayer1Producer.cc
Go to the documentation of this file.
3 
6 
12 
14 
16 
17 #include <memory>
18 
20 public:
23 
24  void beginRun(const edm::Run&, const edm::EventSetup&) override;
25  void produce(edm::Event&, const edm::EventSetup&) override;
26 
27 private:
28  // inputs
31 
32  std::unique_ptr<HGCalBackendLayer1ProcessorBase> backendProcess_;
33 };
34 
36 
38  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))) {
39  //setup Backend parameters
40  const edm::ParameterSet& beParamConfig = conf.getParameterSet("ProcessorParameters");
41  const std::string& beProcessorName = beParamConfig.getParameter<std::string>("ProcessorName");
42  backendProcess_ = std::unique_ptr<HGCalBackendLayer1ProcessorBase>{
43  HGCalBackendLayer1Factory::get()->create(beProcessorName, beParamConfig)};
44 
45  produces<l1t::HGCalClusterBxCollection>(backendProcess_->name());
46 }
47 
51 }
52 
54  // Output collections
55  auto be_cluster_output = std::make_unique<l1t::HGCalClusterBxCollection>();
56 
57  // Input collections
59 
60  e.getByToken(input_cell_, trigCellBxColl);
61  backendProcess_->run(trigCellBxColl, *be_cluster_output, es);
62  e.put(std::move(be_cluster_output), backendProcess_->name());
63 }
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
delete x;
Definition: CaloConfig.h:22
void beginRun(const edm::Run &, const edm::EventSetup &) override
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::unique_ptr< HGCalBackendLayer1ProcessorBase > backendProcess_
HGCalBackendLayer1Producer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
ParameterSet const & getParameterSet(std::string const &) const
HLT enums.
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
def move(src, dest)
Definition: eostools.py:511
T get(const Candidate &c)
Definition: component.h:55
Definition: Run.h:45