CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTBGeometryBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EcalTBGeometryBuilder
4 // Class: EcalTBGeometryBuilder
5 //
13 //
14 // Original Author: Jeremiah Mans
15 // Created: Mon Oct 3 11:35:27 CDT 2005
16 //
17 //
18 
19 
20 // user include files
24 
25 
26 //
27 // constructors and destructor
28 //
30 {
31  //the following line is needed to tell the framework what
32  // data is being produced
33  setWhatProduced(this);
34 
35  //now do what ever other initialization is needed
36 }
37 
38 
40 {
41 }
42 
43 
44 //
45 // member functions
46 //
47 
48 // ------------ method called to produce the data ------------
51 {
53 
54  std::auto_ptr<CaloGeometry> pCaloGeom(new CaloGeometry());
55 
56  // TODO: Look for ECAL parts
57  try {
58  iRecord.get("EcalBarrel", pG);
59  pCaloGeom->setSubdetGeometry(DetId::Ecal,EcalBarrel,pG.product());
60  } catch (...) {
61  edm::LogWarning("MissingInput") << "No Ecal Barrel Geometry found";
62  }
63  try {
64  iRecord.get("EcalLaserPnDiode", pG);
65  pCaloGeom->setSubdetGeometry(DetId::Ecal,EcalLaserPnDiode,pG.product());
66  } catch (...) {
67  edm::LogWarning("MissingInput") << "No Ecal TB Hodoscope Geometry found";
68  }
69 
70  return pCaloGeom;
71 }
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
EcalTBGeometryBuilder(const edm::ParameterSet &)
void get(HolderT &iHolder) const
ReturnType produce(const IdealGeometryRecord &)
T const * product() const
Definition: ESHandle.h:62
std::auto_ptr< CaloGeometry > ReturnType