CMS 3D CMS Logo

HGCalTowerProducer.cc
Go to the documentation of this file.
3 
6 
10 
13 
15 
16 #include <memory>
17 
19 public:
21  ~HGCalTowerProducer() 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<HGCalTowerProcessorBase> towersProcess_;
32 };
33 
35 
37  : input_towers_map_(consumes<l1t::HGCalTowerMapBxCollection>(conf.getParameter<edm::InputTag>("InputTowerMaps"))) {
38  //setup TowerMap parameters
39  const edm::ParameterSet& towerParamConfig = conf.getParameterSet("ProcessorParameters");
40  const std::string& towerProcessorName = towerParamConfig.getParameter<std::string>("ProcessorName");
41  towersProcess_ = HGCalTowerFactory::get()->create(towerProcessorName, towerParamConfig);
42 
43  produces<l1t::HGCalTowerBxCollection>(towersProcess_->name());
44 }
45 
46 void HGCalTowerProducer::beginRun(const edm::Run& /*run*/, const edm::EventSetup& es) {
48  towersProcess_->setGeometry(triggerGeometry_.product());
49 }
50 
52  // Output collections
53  auto towers_output = std::make_unique<l1t::HGCalTowerBxCollection>();
54 
55  // Input collections
57 
58  e.getByToken(input_towers_map_, towersMapBxColl);
59 
60  towersProcess_->run(towersMapBxColl, *towers_output, es);
61 
62  e.put(std::move(towers_output), towersProcess_->name());
63 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HGCalTowerProducer::~HGCalTowerProducer
~HGCalTowerProducer() override
Definition: HGCalTowerProducer.cc:21
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
HGCalTowerProducer::towersProcess_
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
Definition: HGCalTowerProducer.cc:31
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
HGCalTowerProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HGCalTowerProducer.cc:46
HGCalTriggerGeometryBase.h
edm::ESHandle< HGCalTriggerGeometryBase >
HGCalTowerProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalTowerProducer.cc:29
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
HGCalTowerProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HGCalTowerProducer.cc:51
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
HGCalTowerProducer::HGCalTowerProducer
HGCalTowerProducer(const edm::ParameterSet &)
Definition: HGCalTowerProducer.cc:36
l1t::HGCalTowerMapBxCollection
BXVector< HGCalTowerMap > HGCalTowerMapBxCollection
Definition: HGCalTowerMap.h:12
Frameworkfwd.h
HGCalProcessorBase.h
HGCalTowerProducer
Definition: HGCalTowerProducer.cc:18
HGCalTowerProducer::input_towers_map_
edm::EDGetToken input_towers_map_
Definition: HGCalTowerProducer.cc:28
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