CMS 3D CMS Logo

CastorHardcodeGeometryEP Class Reference

#include <Geometry/ForwardGeometry/plugins/CastorHardcodeGeometryEP.h>

Inheritance diagram for CastorHardcodeGeometryEP:

edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef std::auto_ptr
< CaloSubdetectorGeometry
ReturnType

Public Member Functions

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

Private Attributes

CastorHardcodeGeometryLoaderloader_


Detailed Description

Definition at line 20 of file CastorHardcodeGeometryEP.h.


Member Typedef Documentation

typedef std::auto_ptr<CaloSubdetectorGeometry> CastorHardcodeGeometryEP::ReturnType

Definition at line 25 of file CastorHardcodeGeometryEP.h.


Constructor & Destructor Documentation

CastorHardcodeGeometryEP::CastorHardcodeGeometryEP ( const edm::ParameterSet iConfig  ) 

Definition at line 5 of file CastorHardcodeGeometryEP.cc.

References loader_, and edm::ESProducer::setWhatProduced().

00006 {
00007    //the following line is needed to tell the framework what
00008    // data is being produced
00009    setWhatProduced(this,"CASTOR");
00010    loader_=0;
00011 }

CastorHardcodeGeometryEP::~CastorHardcodeGeometryEP (  ) 

Definition at line 14 of file CastorHardcodeGeometryEP.cc.

References loader_.

00015 { 
00016   if (loader_) delete loader_;
00017 }


Member Function Documentation

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

Definition at line 26 of file CastorHardcodeGeometryEP.cc.

References edm::eventsetup::EventSetupRecordImplementation< T >::get(), CastorHardcodeGeometryLoader::load(), and loader_.

00027 {
00028   //using namespace edm::es;
00029   if (loader_==0) {
00030     edm::ESHandle<CastorTopology> topo;
00031     try {
00032       iRecord.get(topo);
00033       loader_=new CastorHardcodeGeometryLoader(*topo); 
00034     } catch (...) {
00035       loader_=new CastorHardcodeGeometryLoader();
00036        edm::LogInfo("CASTOR") << "Using default Castor topology";
00037          }
00038         }
00039    std::auto_ptr<CaloSubdetectorGeometry> pCaloSubdetectorGeometry(loader_->load()) ;
00040 
00041    return pCaloSubdetectorGeometry ;
00042 }


Member Data Documentation

CastorHardcodeGeometryLoader* CastorHardcodeGeometryEP::loader_ [private]

Definition at line 30 of file CastorHardcodeGeometryEP.h.

Referenced by CastorHardcodeGeometryEP(), produce(), and ~CastorHardcodeGeometryEP().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:09 2009 for CMSSW by  doxygen 1.5.4