![]() |
![]() |
#include <tmp/HcalHardcodeGeometryEP/interface/HcalHardcodeGeometryEP.h>
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 |
HcalHardcodeGeometryLoader * | m_loader |
Implementation: <Notes on="" implementation>="">
Definition at line 23 of file HcalHardcodeGeometryEP.h.
typedef boost::shared_ptr<CaloSubdetectorGeometry> HcalHardcodeGeometryEP::ReturnType |
Definition at line 29 of file HcalHardcodeGeometryEP.h.
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 }
void HcalHardcodeGeometryEP::idealRecordCallBack | ( | const IdealGeometryRecord & | iRecord | ) |
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 }
bool HcalHardcodeGeometryEP::m_applyAlignment [private] |
Definition at line 39 of file HcalHardcodeGeometryEP.h.
Referenced by produceAligned(), produceIdeal(), and ~HcalHardcodeGeometryEP().