CMS 3D CMS Logo

DTRecoIdealDBLoader.cc
Go to the documentation of this file.
15 
16 class DTRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
17 public:
19 
20  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
21  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
22  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
23 };
24 
28  if (!mydbservice.isAvailable()) {
29  edm::LogError("DTRecoIdealDBLoader") << "PoolDBOutputService unavailable";
30  return;
31  }
32 
35  es.get<IdealGeometryRecord>().get(pDD);
36  es.get<MuonNumberingRecord>().get(pMNDC);
37 
38  const DDCompactView& cpv = *pDD;
40 
41  dtgp.build(&cpv, *pMNDC, *rig);
42 
43  if (mydbservice->isNewTagRequest("DTRecoGeometryRcd")) {
44  mydbservice->createNewIOV<RecoIdealGeometry>(
45  rig, mydbservice->beginOfTime(), mydbservice->endOfTime(), "DTRecoGeometryRcd");
46  } else {
47  edm::LogError("DTRecoIdealDBLoader") << "DTRecoGeometryRcd Tag is already present.";
48  }
49 }
50 
DTRecoIdealDBLoader(edm::ParameterSet const &)
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
T get() const
Definition: EventSetup.h:73
void build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rig)
Definition: Run.h:45