test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ME0GeometryESModule.cc
Go to the documentation of this file.
1 
10 
14 
17 
23 
24 #include <memory>
25 
26 using namespace edm;
27 
29 {
30  useDDD = p.getParameter<bool>("useDDD");
31  use10EtaPart = p.getParameter<bool>("use10EtaPart");
32  setWhatProduced(this);
33 }
34 
35 
37 
38 
39 std::shared_ptr<ME0Geometry>
41 {
42 
43  LogTrace("ME0GeometryESModule")<<"ME0GeometryESModule::produce with useDDD = "<<useDDD<<" and use10EtaPart = "<<use10EtaPart;
44 
45  if(useDDD && !use10EtaPart){
46  LogTrace("ME0GeometryESModule")<<"ME0GeometryESModule::produce :: ME0GeometryBuilderFromDDD builder";
48  record.getRecord<IdealGeometryRecord>().get(cpv);
50  record.getRecord<MuonNumberingRecord>().get(mdc);
52  return std::shared_ptr<ME0Geometry>(builder.build(&(*cpv), *mdc));
53  }
54  else if(useDDD && use10EtaPart){
55  LogTrace("ME0GeometryESModule")<<"ME0GeometryESModule::produce :: ME0GeometryBuilderFromDDD10EtaPart builder";
57  record.getRecord<IdealGeometryRecord>().get(cpv);
59  record.getRecord<MuonNumberingRecord>().get(mdc);
61  return std::shared_ptr<ME0Geometry>(builder.build(&(*cpv), *mdc));
62  }
63  else{
64  LogTrace("ME0GeometryESModule")<<"ME0GeometryESModule::produce :: ME0GeometryBuilderFromCondDB builder";
66  record.getRecord<ME0RecoGeometryRcd>().get(rigme0);
68  return std::shared_ptr<ME0Geometry>(builder.build(*rigme0));
69  }
70 }
71 
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
#define LogTrace(id)
ME0Geometry * build(const RecoIdealGeometry &rgeo)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ME0Geometry * build(const DDCompactView *cview, const MuonDDDConstants &muonConstants)
virtual ~ME0GeometryESModule()
Destructor.
std::shared_ptr< ME0Geometry > produce(const MuonGeometryRecord &record)
Produce ME0Geometry.