CMS 3D CMS Logo

HGCalTowerMapProducer.cc
Go to the documentation of this file.
3 
10 
13 
15 
16 #include <memory>
17 
19 public:
21  ~HGCalTowerMapProducer() override {}
22 
23  void beginRun(const edm::Run&, const edm::EventSetup&) override;
24  void produce(edm::Event&, const edm::EventSetup&) override;
25 
26 private:
27  // inputs
31  std::unique_ptr<HGCalTowerMapProcessorBase> towersMapProcess_;
32 };
33 
35 
37  : input_sums_(consumes<l1t::HGCalTriggerSumsBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerSums"))),
38  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
39  //setup TowerMap parameters
40  const edm::ParameterSet& towerMapParamConfig = conf.getParameterSet("ProcessorParameters");
41  const std::string& towerMapProcessorName = towerMapParamConfig.getParameter<std::string>("ProcessorName");
42  towersMapProcess_ = std::unique_ptr<HGCalTowerMapProcessorBase>{
43  HGCalTowerMapFactory::get()->create(towerMapProcessorName, towerMapParamConfig)};
44 
45  produces<l1t::HGCalTowerMapBxCollection>(towersMapProcess_->name());
46 }
47 
48 void HGCalTowerMapProducer::beginRun(const edm::Run& /*run*/, const edm::EventSetup& es) {
51 }
52 
54  // Output collections
55  auto towersMap_output = std::make_unique<l1t::HGCalTowerMapBxCollection>();
56 
57  // Input collections
59 
60  e.getByToken(input_sums_, trigSumBxColl);
61 
62  towersMapProcess_->run(trigSumBxColl, *towersMap_output, es);
63 
64  e.put(std::move(towersMap_output), towersMapProcess_->name());
65 }
HGCalTowerMapProducer::~HGCalTowerMapProducer
~HGCalTowerMapProducer() override
Definition: HGCalTowerMapProducer.cc:21
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HGCalTowerMapProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalTowerMapProducer.cc:48
HGCalTriggerGeometryBase
Definition: HGCalTriggerGeometryBase.h:19
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
EDProducer.h
HGCalTriggerSums.h
edm::Handle
Definition: AssociativeIterator.h:50
ESGetToken.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalTowerMapProducer::HGCalTowerMapProducer
HGCalTowerMapProducer(const edm::ParameterSet &)
Definition: HGCalTowerMapProducer.cc:36
HGCalTriggerGeometryBase.h
edm::ESHandle< HGCalTriggerGeometryBase >
HGCalTowerMapProducer::towersMapProcess_
std::unique_ptr< HGCalTowerMapProcessorBase > towersMapProcess_
Definition: HGCalTowerMapProducer.cc:31
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalTowerMapProducer
Definition: HGCalTowerMapProducer.cc:18
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
Event.h
l1t
delete x;
Definition: CaloConfig.h:22
HGCalTower.h
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:58
HGCalTowerMapProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HGCalTowerMapProducer.cc:53
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord >
eostools.move
def move(src, dest)
Definition: eostools.py:511
HGCalTowerMapProducer::input_sums_
edm::EDGetToken input_sums_
Definition: HGCalTowerMapProducer.cc:28
Frameworkfwd.h
HGCalTowerMapProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalTowerMapProducer.cc:29
HGCalProcessorBase.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTowerMapProducer::triggerGeomToken_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
Definition: HGCalTowerMapProducer.cc:30
HGCalTriggerCell.h
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
l1t::HGCalTriggerSumsBxCollection
BXVector< HGCalTriggerSums > HGCalTriggerSumsBxCollection
Definition: HGCalTriggerSums.h:11
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37