CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CaloTowerTopologyEP.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CaloTowerTopologyEP
4 // Class: CaloTowerTopologyEP
5 //
19 
20 //
21 // constants, enums and typedefs
22 //
23 
24 //
25 // static data member definitions
26 //
27 
28 //
29 // constructors and destructor
30 //
32  : topoToken_{setWhatProduced(this).consumes<HcalTopology>(edm::ESInputTag{})} {
33  edm::LogInfo("HCAL") << "CaloTowerTopologyEP::CaloTowerTopologyEP";
34 }
35 
37 
40  descriptions.add("CaloTowerTopology", desc);
41 }
42 
43 //
44 // member functions
45 //
46 
47 // ------------ method called to produce the data ------------
49  const auto& hcaltopo = iRecord.get(topoToken_);
50 
51  edm::LogInfo("HCAL") << "CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord)";
52 
53  return std::make_unique<CaloTowerTopology>(&hcaltopo);
54 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
ReturnType produce(const HcalRecNumberingRecord &)
Log< level::Info, false > LogInfo
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topoToken_
std::unique_ptr< CaloTowerTopology > ReturnType
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
CaloTowerTopologyEP(const edm::ParameterSet &)