CMS 3D CMS Logo

ME0GeometryESModule.cc
Go to the documentation of this file.
1 
9 
13 
16 
22 
23 #include <memory>
24 
25 using namespace edm;
26 
28 {
29  useDDD = p.getParameter<bool>("useDDD");
30  setWhatProduced(this);
31 }
32 
33 
35 
36 
37 std::unique_ptr<ME0Geometry>
39 {
40 
41  LogTrace("ME0GeometryESModule")<<"ME0GeometryESModule::produce with useDDD = "<<useDDD;
42 
43  if(useDDD){
44  LogTrace("ME0GeometryESModule")<<"ME0GeometryESModule::produce :: ME0GeometryBuilderFromDDD builder";
46  record.getRecord<IdealGeometryRecord>().get(cpv);
48  record.getRecord<MuonNumberingRecord>().get(mdc);
50  return std::unique_ptr<ME0Geometry>(builder.build(&(*cpv), *mdc));
51  }
52  else{
53  LogTrace("ME0GeometryESModule")<<"ME0GeometryESModule::produce :: ME0GeometryBuilderFromCondDB builder";
55  record.getRecord<ME0RecoGeometryRcd>().get(rigme0);
57  return std::unique_ptr<ME0Geometry>(builder.build(*rigme0));
58  }
59 }
60 
T getParameter(std::string const &) const
ME0GeometryESModule(const edm::ParameterSet &p)
Constructor.
ME0Geometry * build(const DDCompactView *cview, const MuonDDDConstants &muonConstants)
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< ME0Geometry > produce(const MuonGeometryRecord &record)
Produce ME0Geometry.
#define LogTrace(id)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ME0Geometry * build(const RecoIdealGeometry &rgeo)
~ME0GeometryESModule() override
Destructor.
HLT enums.