CMS 3D CMS Logo

Public Member Functions | Private Attributes

RPCGeometryESModule Class Reference

#include <RPCGeometryESModule.h>

Inheritance diagram for RPCGeometryESModule:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

boost::shared_ptr< RPCGeometryproduce (const MuonGeometryRecord &record)
 Produce RPCGeometry.
 RPCGeometryESModule (const edm::ParameterSet &p)
 Constructor.
virtual ~RPCGeometryESModule ()
 Destructor.

Private Attributes

bool comp11
bool useDDD

Detailed Description

ESProducer for RPCGeometry in MuonGeometryRecord

Author:
M. Maggi - INFN Bari

Definition at line 17 of file RPCGeometryESModule.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 37 of file RPCGeometryESModule.cc.

{}

Member Function Documentation

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));
  }

}

Member Data Documentation

Definition at line 30 of file RPCGeometryESModule.h.

Definition at line 30 of file RPCGeometryESModule.h.