CMS 3D CMS Logo

HcalTrigTowerGeometryESProducer.cc
Go to the documentation of this file.
4 #include <memory>
5 
7  : topologyToken_{setWhatProduced(this).consumesFrom<HcalTopology, HcalRecNumberingRecord>(edm::ESInputTag{})} {}
8 
10 
11 std::unique_ptr<HcalTrigTowerGeometry> HcalTrigTowerGeometryESProducer::produce(const CaloGeometryRecord& iRecord) {
12  const auto& hcalTopology = iRecord.get(topologyToken_);
13  return std::make_unique<HcalTrigTowerGeometry>(&hcalTopology);
14 }
15 
18  descriptions.add("HcalTrigTowerGeometryESProducer", desc);
19 }
20 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: config.py:1
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topologyToken_
HcalTrigTowerGeometryESProducer(const edm::ParameterSet &conf)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
std::unique_ptr< HcalTrigTowerGeometry > produce(const CaloGeometryRecord &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const