CMS 3D CMS Logo

CaloTopologyBuilder.cc
Go to the documentation of this file.
8 
9 
11 {
12  //the following line is needed to tell the framework what
13  // data is being produced
14 
15 // disable
16 // setWhatProduced( this, &CaloTopologyBuilder::produceIdeal );
18 }
19 
20 
22 {
23 }
24 
25 
26 //
27 // member functions
28 //
29 
30 // ------------ method called to produce the data ------------
33 {
34  edm::ESHandle<CaloGeometry> theGeometry ;
35  iRecord.getRecord<CaloGeometryRecord>().get( theGeometry ) ;
36 
37  ReturnType ct = std::make_unique<CaloTopology>();
38  //ECAL parts
39  ct->setSubdetTopology( DetId::Ecal,
40  EcalBarrel,
41  std::make_unique<EcalBarrelTopology>( *theGeometry ) ) ;
42  ct->setSubdetTopology( DetId::Ecal,
43  EcalEndcap,
44  std::make_unique<EcalEndcapTopology>( *theGeometry ) ) ;
45  ct->setSubdetTopology( DetId::Ecal,
47  std::make_unique<EcalPreshowerTopology>());
48  return ct ;
49 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::unique_ptr< CaloTopology > ReturnType
ReturnType produceCalo(const CaloTopologyRecord &)
CaloTopologyBuilder(const edm::ParameterSet &iP)