#include <RPCGeometryESModule.h>
Public Member Functions | |
boost::shared_ptr< RPCGeometry > | produce (const MuonGeometryRecord &record) |
Produce RPCGeometry. | |
RPCGeometryESModule (const edm::ParameterSet &p) | |
Constructor. | |
virtual | ~RPCGeometryESModule () |
Destructor. | |
Private Attributes | |
bool | comp11 |
bool | useDDD |
ESProducer for RPCGeometry in MuonGeometryRecord
Definition at line 17 of file RPCGeometryESModule.h.
RPCGeometryESModule::RPCGeometryESModule | ( | const edm::ParameterSet & | p | ) |
Constructor.
Definition at line 28 of file RPCGeometryESModule.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); }
RPCGeometryESModule::~RPCGeometryESModule | ( | ) | [virtual] |
boost::shared_ptr< RPCGeometry > RPCGeometryESModule::produce | ( | const MuonGeometryRecord & | record | ) |
Produce RPCGeometry.
Definition at line 41 of file RPCGeometryESModule.cc.
References RPCGeometryBuilderFromCondDB::build(), RPCGeometryBuilderFromDDD::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); RPCGeometryBuilderFromDDD builder(comp11); return boost::shared_ptr<RPCGeometry>(builder.build(&(*cpv), *mdc)); }else{ edm::ESHandle<RecoIdealGeometry> rigrpc; record.getRecord<RPCRecoGeometryRcd>().get(rigrpc); RPCGeometryBuilderFromCondDB builder(comp11); return boost::shared_ptr<RPCGeometry>(builder.build(*rigrpc)); } }
bool RPCGeometryESModule::comp11 [private] |
Definition at line 30 of file RPCGeometryESModule.h.
bool RPCGeometryESModule::useDDD [private] |
Definition at line 30 of file RPCGeometryESModule.h.