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&, const edm::EventSetup&) override;
24  void produce(edm::Event&, const edm::EventSetup&) override;
25 
26 private:
27  // inputs
30 
31  std::unique_ptr<HGCalTowerMapProcessorBase> towersMapProcess_;
32 };
33 
35 
37  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))) {
38  //setup TowerMap parameters
39  const edm::ParameterSet& towerMapParamConfig = conf.getParameterSet("ProcessorParameters");
40  const std::string& towerMapProcessorName = towerMapParamConfig.getParameter<std::string>("ProcessorName");
41  towersMapProcess_ = std::unique_ptr<HGCalTowerMapProcessorBase>{
42  HGCalTowerMapFactory::get()->create(towerMapProcessorName, towerMapParamConfig)};
43 
44  produces<l1t::HGCalTowerMapBxCollection>(towersMapProcess_->name());
45 }
46 
47 void HGCalTowerMapProducer::beginRun(const edm::Run& /*run*/, const edm::EventSetup& es) {
50 }
51 
53  // Output collections
54  auto towersMap_output = std::make_unique<l1t::HGCalTowerMapBxCollection>();
55 
56  // Input collections
58 
59  e.getByToken(input_cell_, trigCellBxColl);
60 
61  towersMapProcess_->run(trigCellBxColl, *towersMap_output, es);
62 
63  e.put(std::move(towersMap_output), towersMapProcess_->name());
64 }
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:47
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
EDProducer.h
HGCalTriggerSums.h
edm::Handle
Definition: AssociativeIterator.h:50
MakerMacros.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalTowerMapProducer::HGCalTowerMapProducer
HGCalTowerMapProducer(const edm::ParameterSet &)
Definition: HGCalTowerMapProducer.cc:36
HGCalTriggerGeometryBase.h
l1t::HGCalTriggerCellBxCollection
BXVector< HGCalTriggerCell > HGCalTriggerCellBxCollection
Definition: HGCalTriggerCell.h:11
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
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
l1t
delete x;
Definition: CaloConfig.h:22
HGCalTower.h
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
HGCalTowerMapProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HGCalTowerMapProducer.cc:52
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
HGCalTowerMapProducer::input_cell_
edm::EDGetToken input_cell_
Definition: HGCalTowerMapProducer.cc:28
Frameworkfwd.h
HGCalTowerMapProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalTowerMapProducer.cc:29
HGCalProcessorBase.h
HGCalTriggerCell.h
edm::Event
Definition: Event.h:73
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2121
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37