CMS 3D CMS Logo

HcalHardcodeGeometryEP Class Reference

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

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

Inheritance diagram for HcalHardcodeGeometryEP:

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

List of all members.

Public Types

typedef boost::shared_ptr
< CaloSubdetectorGeometry
ReturnType

Public Member Functions

 HcalHardcodeGeometryEP (const edm::ParameterSet &)
void idealRecordCallBack (const IdealGeometryRecord &)
ReturnType produceAligned (const HcalGeometryRecord &)
ReturnType produceIdeal (const IdealGeometryRecord &)
virtual ~HcalHardcodeGeometryEP ()

Private Attributes

bool m_applyAlignment
HcalHardcodeGeometryLoaderm_loader


Detailed Description

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

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

Definition at line 23 of file HcalHardcodeGeometryEP.h.


Member Typedef Documentation

typedef boost::shared_ptr<CaloSubdetectorGeometry> HcalHardcodeGeometryEP::ReturnType

Definition at line 29 of file HcalHardcodeGeometryEP.h.


Constructor & Destructor Documentation

HcalHardcodeGeometryEP::HcalHardcodeGeometryEP ( const edm::ParameterSet ps  ) 

Definition at line 35 of file HcalHardcodeGeometryEP.cc.

References edm::eventsetup::dependsOn(), idealRecordCallBack(), produceAligned(), and edm::ESProducer::setWhatProduced().

00035                                                                           :
00036    m_loader ( 0 ) ,
00037    m_applyAlignment ( ps.getUntrackedParameter<bool>("applyAlignment", false) )
00038 {
00039    //the following line is needed to tell the framework what
00040    // data is being produced
00041    setWhatProduced( this,
00042                     &HcalHardcodeGeometryEP::produceAligned,
00043                     dependsOn( &HcalHardcodeGeometryEP::idealRecordCallBack ),
00044                     "HCAL");
00045 
00046 // disable
00047 //   setWhatProduced( this,
00048 //                  &HcalHardcodeGeometryEP::produceIdeal,
00049 //                  edm::es::Label( "HCAL" ) );
00050 }

HcalHardcodeGeometryEP::~HcalHardcodeGeometryEP (  )  [virtual]

Definition at line 53 of file HcalHardcodeGeometryEP.cc.

References m_loader.

00054 { 
00055    delete m_loader ;
00056 }


Member Function Documentation

void HcalHardcodeGeometryEP::idealRecordCallBack ( const IdealGeometryRecord iRecord  ) 

Definition at line 66 of file HcalHardcodeGeometryEP.cc.

Referenced by HcalHardcodeGeometryEP().

00067 {
00068 }

HcalHardcodeGeometryEP::ReturnType HcalHardcodeGeometryEP::produceAligned ( const HcalGeometryRecord iRecord  ) 

Definition at line 86 of file HcalHardcodeGeometryEP.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HcalHardcodeGeometryLoader::load(), m_loader, and ptr.

Referenced by HcalHardcodeGeometryEP().

00087 {
00088    //now do what ever other initialization is needed
00089    ReturnType ptr ;
00090    edm::LogInfo("HCAL") << "Using default HCAL topology" ;
00091 
00092    edm::ESHandle<HcalTopology> topology ;
00093    iRecord.getRecord<IdealGeometryRecord>().get( topology ) ;
00094    if( 0 == m_loader ) m_loader = new HcalHardcodeGeometryLoader( *topology ) ;
00095    ptr = ReturnType( m_loader->load() ) ; 
00096    return ptr ;
00097 }

HcalHardcodeGeometryEP::ReturnType HcalHardcodeGeometryEP::produceIdeal ( const IdealGeometryRecord iRecord  ) 

Definition at line 71 of file HcalHardcodeGeometryEP.cc.

References edm::eventsetup::EventSetupRecordImplementation< T >::get(), HcalHardcodeGeometryLoader::load(), m_applyAlignment, m_loader, and ptr.

00072 {
00073    assert( !m_applyAlignment ) ;
00074 
00075    //now do what ever other initialization is needed
00076    ReturnType ptr ;
00077    edm::LogInfo("HCAL") << "Using default HCAL topology" ;
00078    edm::ESHandle<HcalTopology> topology ;
00079    iRecord.get( topology ) ;
00080    m_loader = new HcalHardcodeGeometryLoader( *topology ) ;
00081    ptr = ReturnType( m_loader->load() ) ;
00082    return ptr ;
00083 }


Member Data Documentation

bool HcalHardcodeGeometryEP::m_applyAlignment [private]

Definition at line 41 of file HcalHardcodeGeometryEP.h.

Referenced by produceIdeal().

HcalHardcodeGeometryLoader* HcalHardcodeGeometryEP::m_loader [private]

Definition at line 39 of file HcalHardcodeGeometryEP.h.

Referenced by produceAligned(), produceIdeal(), and ~HcalHardcodeGeometryEP().


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