00001 #include "HcalTrigTowerGeometryESProducer.h" 00002 #include "FWCore/Framework/interface/ModuleFactory.h" 00003 #include "FWCore/Framework/interface/ESHandle.h" 00004 #include "Geometry/Records/interface/IdealGeometryRecord.h" 00005 #include <memory> 00006 00007 HcalTrigTowerGeometryESProducer::HcalTrigTowerGeometryESProducer( const edm::ParameterSet & config ) 00008 { 00009 useFullGranularityHF_=config.getParameter<bool>("useFullGranularityHF"); 00010 00011 setWhatProduced( this ); 00012 } 00013 00014 HcalTrigTowerGeometryESProducer::~HcalTrigTowerGeometryESProducer( void ) 00015 {} 00016 00017 boost::shared_ptr<HcalTrigTowerGeometry> 00018 HcalTrigTowerGeometryESProducer::produce( const CaloGeometryRecord & iRecord ) 00019 { 00020 edm::ESHandle<HcalTopology> hcalTopology; 00021 iRecord.getRecord<IdealGeometryRecord>().get( hcalTopology ); 00022 00023 m_hcalTrigTowerGeom = 00024 boost::shared_ptr<HcalTrigTowerGeometry>( new HcalTrigTowerGeometry( &*hcalTopology)); 00025 m_hcalTrigTowerGeom->setUpgradeConfigurationHFTowers(useFullGranularityHF_); 00026 00027 return m_hcalTrigTowerGeom; 00028 } 00029 00030 void HcalTrigTowerGeometryESProducer::fillDescriptions(edm::ConfigurationDescriptions & descriptions) { 00031 edm::ParameterSetDescription desc; 00032 desc.add<bool>("useFullGranularityHF", false); 00033 descriptions.add("HcalTrigTowerGeometryESProducer", desc); 00034 } 00035 00036 DEFINE_FWK_EVENTSETUP_MODULE( HcalTrigTowerGeometryESProducer );