CMS 3D CMS Logo

Public Types | Public Member Functions

EcalTBGeometryBuilder Class Reference

#include <tmp/EcalTBGeometryBuilder/interface/EcalTBGeometryBuilder.h>

Inheritance diagram for EcalTBGeometryBuilder:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef std::auto_ptr
< CaloGeometry
ReturnType

Public Member Functions

 EcalTBGeometryBuilder (const edm::ParameterSet &)
ReturnType produce (const IdealGeometryRecord &)
 ~EcalTBGeometryBuilder ()

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 37 of file EcalTBGeometryBuilder.h.


Member Typedef Documentation

Definition at line 42 of file EcalTBGeometryBuilder.h.


Constructor & Destructor Documentation

EcalTBGeometryBuilder::EcalTBGeometryBuilder ( const edm::ParameterSet iConfig)

Definition at line 30 of file EcalTBGeometryBuilder.cc.

References edm::ESProducer::setWhatProduced().

{
   //the following line is needed to tell the framework what
   // data is being produced
   setWhatProduced(this);

   //now do what ever other initialization is needed
}
EcalTBGeometryBuilder::~EcalTBGeometryBuilder ( )

Definition at line 40 of file EcalTBGeometryBuilder.cc.

{ 
}

Member Function Documentation

EcalTBGeometryBuilder::ReturnType EcalTBGeometryBuilder::produce ( const IdealGeometryRecord iRecord)

Definition at line 51 of file EcalTBGeometryBuilder.cc.

References DetId::Ecal, EcalBarrel, EcalLaserPnDiode, edm::eventsetup::EventSetupRecord::get(), and edm::ESHandle< T >::product().

{
   edm::ESHandle<CaloSubdetectorGeometry> pG;

   std::auto_ptr<CaloGeometry> pCaloGeom(new CaloGeometry());

   // TODO: Look for ECAL parts
   try {
     iRecord.get("EcalBarrel", pG); 
     pCaloGeom->setSubdetGeometry(DetId::Ecal,EcalBarrel,pG.product());
   } catch (...) {
     edm::LogWarning("MissingInput") << "No Ecal Barrel Geometry found";     
   }
   try {
     iRecord.get("EcalLaserPnDiode", pG); 
     pCaloGeom->setSubdetGeometry(DetId::Ecal,EcalLaserPnDiode,pG.product());
   } catch (...) {
     edm::LogWarning("MissingInput") << "No Ecal TB Hodoscope Geometry found";     
   }

   return pCaloGeom;
}