CMS 3D CMS Logo

HGCalBackendLayer2Producer.cc
Go to the documentation of this file.
3 
6 
11 
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<HGCalBackendLayer2ProcessorBase> backendProcess_;
33 };
34 
36 
38  : input_clusters_(consumes<l1t::HGCalClusterBxCollection>(conf.getParameter<edm::InputTag>("InputCluster"))) {
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<HGCalBackendLayer2ProcessorBase>{
43  HGCalBackendLayer2Factory::get()->create(beProcessorName, beParamConfig)};
44 
45  produces<l1t::HGCalMulticlusterBxCollection>(backendProcess_->name());
46 }
47 
51 }
52 
54  // Output collections
55  auto be_multicluster_output = std::make_unique<l1t::HGCalMulticlusterBxCollection>();
56 
57  // Input collections
59 
60  e.getByToken(input_clusters_, trigCluster2DBxColl);
61 
62  backendProcess_->run(trigCluster2DBxColl, *be_multicluster_output, es);
63 
64  e.put(std::move(be_multicluster_output), backendProcess_->name());
65 }
T getParameter(std::string const &) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
HGCalBackendLayer2Producer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
delete x;
Definition: CaloConfig.h:22
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::unique_ptr< HGCalBackendLayer2ProcessorBase > backendProcess_
ParameterSet const & getParameterSet(std::string const &) const
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
BXVector< HGCalCluster > HGCalClusterBxCollection
Definition: HGCalCluster.h:27
HLT enums.
T get() const
Definition: EventSetup.h:73
T const * product() const
Definition: ESHandle.h:86
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45