CMS 3D CMS Logo

CaloTopologyBuilder.cc
Go to the documentation of this file.
7 
10  .consumesFrom<CaloGeometry, CaloGeometryRecord>(edm::ESInputTag{})} {}
11 
13 
14 //
15 // member functions
16 //
17 
18 // ------------ method called to produce the data ------------
20  const auto& geometry = iRecord.get(geometryToken_);
21 
22  ReturnType ct = std::make_unique<CaloTopology>();
23  //ECAL parts
24  ct->setSubdetTopology(DetId::Ecal, EcalBarrel, std::make_unique<EcalBarrelTopology>(geometry));
25  ct->setSubdetTopology(DetId::Ecal, EcalEndcap, std::make_unique<EcalEndcapTopology>(geometry));
26  ct->setSubdetTopology(DetId::Ecal, EcalPreshower, std::make_unique<EcalPreshowerTopology>());
27  return ct;
28 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
std::unique_ptr< CaloTopology > ReturnType
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
ReturnType produceCalo(const CaloTopologyRecord &)
CaloTopologyBuilder(const edm::ParameterSet &iP)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const