CMS 3D CMS Logo

HGCalTowerProcessor_SA.cc
Go to the documentation of this file.
2 
5 
10 
12 
14 public:
16  const std::string towerMapsAlgoName(
17  conf.getParameterSet("towermap_parameters").getParameter<std::string>("AlgoName"));
18  towerMapWrapper_ = std::unique_ptr<HGCalTowerMapsWrapperBase>{HGCalTowerMapsWrapperBaseFactory::get()->create(
19  towerMapsAlgoName, conf.getParameterSet("towermap_parameters"))};
20  }
21 
23  collHandle,
24  l1t::HGCalTowerBxCollection& collTowers) override {
25  auto& towerMapCollHandle = collHandle.first;
26 
27  /* create a persistent vector of pointers to the towerMaps */
28  std::vector<edm::Ptr<l1t::HGCalTowerMap>> towerMapsPtrs;
29  for (unsigned i = 0; i < towerMapCollHandle->size(); ++i) {
30  towerMapsPtrs.emplace_back(towerMapCollHandle, i);
31  }
32 
33  // Configuration
34  const std::pair<const HGCalTriggerGeometryBase* const, const edm::ParameterSet&> configuration{geometry(), conf_};
35  towerMapWrapper_->configure(configuration);
36  towerMapWrapper_->process(towerMapsPtrs, collTowers);
37  }
38 
39 private:
41 
42  /* Standalone algorithm instance */
43  std::unique_ptr<HGCalTowerMapsWrapperBase> towerMapWrapper_;
44 
46 };
47 
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
ParameterSet const & getParameterSet(std::string const &) const
const edm::ParameterSet conf_
void run(const std::pair< edm::Handle< l1t::HGCalTowerMapBxCollection >, edm::Handle< l1t::HGCalClusterBxCollection >> &collHandle, l1t::HGCalTowerBxCollection &collTowers) override
std::unique_ptr< HGCalTowerMapsWrapperBase > towerMapWrapper_
HGCalTowerProcessorSA(const edm::ParameterSet &conf)
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
dictionary configuration
Definition: JetHT_cfg.py:38
const HGCalTriggerGeometryBase * geometry() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
#define get