CMS 3D CMS Logo

HGCalBackendLayer2Producer.cc
Go to the documentation of this file.
3 
7 
12 
15 
17 
18 #include <memory>
19 #include <utility>
20 
22 public:
25 
26  void beginRun(const edm::Run&, const edm::EventSetup&) override;
27  void produce(edm::Event&, const edm::EventSetup&) override;
28 
29 private:
30  // inputs
34 
35  std::unique_ptr<HGCalBackendLayer2ProcessorBase> backendProcess_;
36 };
37 
39 
41  : input_clusters_(consumes<l1t::HGCalClusterBxCollection>(conf.getParameter<edm::InputTag>("InputCluster"))),
42  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
43  //setup Backend parameters
44  const edm::ParameterSet& beParamConfig = conf.getParameterSet("ProcessorParameters");
45  const std::string& beProcessorName = beParamConfig.getParameter<std::string>("ProcessorName");
46  backendProcess_ = std::unique_ptr<HGCalBackendLayer2ProcessorBase>{
47  HGCalBackendLayer2Factory::get()->create(beProcessorName, beParamConfig)};
48 
49  produces<l1t::HGCalMulticlusterBxCollection>(backendProcess_->name());
50  produces<l1t::HGCalClusterBxCollection>(backendProcess_->name() + "Unclustered");
51 }
52 
56 }
57 
59  // Output collections
60  std::pair<l1t::HGCalMulticlusterBxCollection, l1t::HGCalClusterBxCollection> be_output;
61 
62  // Input collections
64 
65  e.getByToken(input_clusters_, trigCluster2DBxColl);
66 
67  backendProcess_->run(trigCluster2DBxColl, be_output, es);
68 
69  e.put(std::make_unique<l1t::HGCalMulticlusterBxCollection>(std::move(be_output.first)), backendProcess_->name());
70  e.put(std::make_unique<l1t::HGCalClusterBxCollection>(std::move(be_output.second)),
71  backendProcess_->name() + "Unclustered");
72 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HGCalTriggerGeometryBase
Definition: HGCalTriggerGeometryBase.h:19
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
HGCalBackendLayer2Producer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalBackendLayer2Producer.cc:32
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
EDProducer.h
HGCalTriggerSums.h
edm::Handle
Definition: AssociativeIterator.h:50
ESGetToken.h
MakerMacros.h
HGCalBackendLayer2Producer::input_clusters_
edm::EDGetToken input_clusters_
Definition: HGCalBackendLayer2Producer.cc:31
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalTriggerGeometryBase.h
edm::ESHandle< HGCalTriggerGeometryBase >
l1t::HGCalClusterBxCollection
BXVector< HGCalCluster > HGCalClusterBxCollection
Definition: HGCalCluster.h:27
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
Event.h
l1t
delete x;
Definition: CaloConfig.h:22
HGCalBackendLayer2Producer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HGCalBackendLayer2Producer.cc:58
HGCDigiCollections.h
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
HGCalCluster.h
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord >
eostools.move
def move(src, dest)
Definition: eostools.py:511
HGCalBackendLayer2Producer
Definition: HGCalBackendLayer2Producer.cc:21
HGCalBackendLayer2Producer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalBackendLayer2Producer.cc:53
HGCalBackendLayer2Producer::HGCalBackendLayer2Producer
HGCalBackendLayer2Producer(const edm::ParameterSet &)
Definition: HGCalBackendLayer2Producer.cc:40
Frameworkfwd.h
HGCalBackendLayer2Producer::triggerGeomToken_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
Definition: HGCalBackendLayer2Producer.cc:33
HGCalProcessorBase.h
HGCalBackendLayer2Producer::~HGCalBackendLayer2Producer
~HGCalBackendLayer2Producer() override
Definition: HGCalBackendLayer2Producer.cc:24
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTriggerCell.h
edm::Event
Definition: Event.h:73
HGCalBackendLayer2Producer::backendProcess_
std::unique_ptr< HGCalBackendLayer2ProcessorBase > backendProcess_
Definition: HGCalBackendLayer2Producer.cc:35
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37