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 // $Id: EcalTBGeometryBuilder.cc,v 1.3 2010/03/26 19:51:48 sunanda Exp $
17 //
18 //
19 
20 
21 // user include files
25 
26 
27 //
28 // constructors and destructor
29 //
31 {
32  //the following line is needed to tell the framework what
33  // data is being produced
34  setWhatProduced(this);
35 
36  //now do what ever other initialization is needed
37 }
38 
39 
41 {
42 }
43 
44 
45 //
46 // member functions
47 //
48 
49 // ------------ method called to produce the data ------------
52 {
54 
55  std::auto_ptr<CaloGeometry> pCaloGeom(new CaloGeometry());
56 
57  // TODO: Look for ECAL parts
58  try {
59  iRecord.get("EcalBarrel", pG);
60  pCaloGeom->setSubdetGeometry(DetId::Ecal,EcalBarrel,pG.product());
61  } catch (...) {
62  edm::LogWarning("MissingInput") << "No Ecal Barrel Geometry found";
63  }
64  try {
65  iRecord.get("EcalLaserPnDiode", pG);
66  pCaloGeom->setSubdetGeometry(DetId::Ecal,EcalLaserPnDiode,pG.product());
67  } catch (...) {
68  edm::LogWarning("MissingInput") << "No Ecal TB Hodoscope Geometry found";
69  }
70 
71  return pCaloGeom;
72 }
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