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<IdealGeometryRecord>().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::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: DTRecoIdealDBLoader.cc:25
EDAnalyzer.h
ESTransientHandle.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
ESHandle.h
DTRecoIdealDBLoader::DTRecoIdealDBLoader
DTRecoIdealDBLoader(edm::ParameterSet const &)
Definition: DTRecoIdealDBLoader.cc:18
DTRecoGeometryRcd.h
edm::Run
Definition: Run.h:45
MuonGeometryConstants.h
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
MuonNumberingRecord.h
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
DDCompactView.h
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:107
Service.h
DTRecoIdealDBLoader::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: DTRecoIdealDBLoader.cc:21
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
edm::ESHandle
Definition: DTSurvey.h:22
RecoIdealGeometry.h
DTGeometryParsFromDD
Definition: DTGeometryParsFromDD.h:24
DTRecoIdealDBLoader
Definition: DTRecoIdealDBLoader.cc:16
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
DTRecoIdealDBLoader::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: DTRecoIdealDBLoader.cc:22
DTGeometryParsFromDD.h
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:175
DTGeometryParsFromDD::build
void build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig)
Definition: DTGeometryParsFromDD.cc:33
EventSetup.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:90
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27
RecoIdealGeometry
Definition: RecoIdealGeometry.h:28