CMS 3D CMS Logo

Public Member Functions | Private Attributes

GEMGeometryESModule Class Reference

#include <GEMGeometryESModule.h>

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

List of all members.

Public Member Functions

 GEMGeometryESModule (const edm::ParameterSet &p)
 Constructor.
boost::shared_ptr< GEMGeometryproduce (const MuonGeometryRecord &record)
 Produce GEMGeometry.
virtual ~GEMGeometryESModule ()
 Destructor.

Private Attributes

bool comp11
bool useDDD

Detailed Description

ESProducer for GEMGeometry in MuonGeometryRecord

Author:
M. Maggi - INFN Bari

Definition at line 17 of file GEMGeometryESModule.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 37 of file GEMGeometryESModule.cc.

{}

Member Function Documentation

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

}

Member Data Documentation

Definition at line 30 of file GEMGeometryESModule.h.

Definition at line 30 of file GEMGeometryESModule.h.