#include <GEMGeometryESModule.h>
Public Member Functions | |
GEMGeometryESModule (const edm::ParameterSet &p) | |
Constructor. | |
boost::shared_ptr< GEMGeometry > | produce (const MuonGeometryRecord &record) |
Produce GEMGeometry. | |
virtual | ~GEMGeometryESModule () |
Destructor. | |
Private Attributes | |
bool | comp11 |
bool | useDDD |
ESProducer for GEMGeometry in MuonGeometryRecord
Definition at line 17 of file GEMGeometryESModule.h.
GEMGeometryESModule::GEMGeometryESModule | ( | const edm::ParameterSet & | p | ) |
Constructor.
Definition at line 28 of file GEMGeometryESModule.cc.
References edm::ParameterSet::getUntrackedParameter().
{ comp11 = p.getUntrackedParameter<bool>("compatibiltyWith11",true); // Find out if using the DDD or CondDB Geometry source. useDDD = p.getUntrackedParameter<bool>("useDDD",true); setWhatProduced(this); }
GEMGeometryESModule::~GEMGeometryESModule | ( | ) | [virtual] |
boost::shared_ptr< GEMGeometry > GEMGeometryESModule::produce | ( | const MuonGeometryRecord & | record | ) |
Produce GEMGeometry.
Definition at line 41 of file GEMGeometryESModule.cc.
References GEMGeometryBuilderFromDDD::build(), GEMGeometryBuilderFromCondDB::build(), and edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord().
{ if(useDDD){ edm::ESTransientHandle<DDCompactView> cpv; record.getRecord<IdealGeometryRecord>().get(cpv); edm::ESHandle<MuonDDDConstants> mdc; record.getRecord<MuonNumberingRecord>().get(mdc); GEMGeometryBuilderFromDDD builder(comp11); return boost::shared_ptr<GEMGeometry>(builder.build(&(*cpv), *mdc)); }else{ edm::ESHandle<RecoIdealGeometry> riggem; record.getRecord<GEMRecoGeometryRcd>().get(riggem); GEMGeometryBuilderFromCondDB builder(comp11); return boost::shared_ptr<GEMGeometry>(builder.build(*riggem)); } }
bool GEMGeometryESModule::comp11 [private] |
Definition at line 30 of file GEMGeometryESModule.h.
bool GEMGeometryESModule::useDDD [private] |
Definition at line 30 of file GEMGeometryESModule.h.