CMS 3D CMS Logo

DTRecoIdealDBLoader.cc
Go to the documentation of this file.
21 
22 class DTRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
23 public:
25 
26  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
27  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
28  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
29 
30 private:
32 };
33 
35  fromDD4Hep_ = iC.getUntrackedParameter<bool>("fromDD4Hep", false);
36 }
37 
41  if (!mydbservice.isAvailable()) {
42  edm::LogError("DTRecoIdealDBLoader") << "PoolDBOutputService unavailable";
43  return;
44  }
45 
48 
49  if (fromDD4Hep_) {
51  es.get<IdealGeometryRecord>().get(pDD);
52  es.get<IdealGeometryRecord>().get(pMNDC);
53  const cms::DDCompactView& cpv = *pDD;
54  dtgp.build(&cpv, *pMNDC, *rig);
55  } else {
57  es.get<IdealGeometryRecord>().get(pDD);
58  es.get<IdealGeometryRecord>().get(pMNDC);
59  const DDCompactView& cpv = *pDD;
60  dtgp.build(&cpv, *pMNDC, *rig);
61  }
62  if (mydbservice->isNewTagRequest("DTRecoGeometryRcd")) {
63  mydbservice->createNewIOV<RecoIdealGeometry>(
64  rig, mydbservice->beginOfTime(), mydbservice->endOfTime(), "DTRecoGeometryRcd");
65  } else {
66  edm::LogError("DTRecoIdealDBLoader") << "DTRecoGeometryRcd Tag is already present.";
67  }
68 }
69 
DTRecoIdealDBLoader::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: DTRecoIdealDBLoader.cc:38
EDAnalyzer.h
ESTransientHandle.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
ESHandle.h
DTRecoIdealDBLoader::DTRecoIdealDBLoader
DTRecoIdealDBLoader(edm::ParameterSet const &)
Definition: DTRecoIdealDBLoader.cc:34
DTRecoGeometryRcd.h
edm::Run
Definition: Run.h:45
MuonGeometryConstants.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
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:87
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:116
Service.h
DTRecoIdealDBLoader::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: DTRecoIdealDBLoader.cc:27
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
edm::ESHandle
Definition: DTSurvey.h:22
DDCompactView.h
ParameterSetDescription.h
RecoIdealGeometry.h
DTGeometryParsFromDD
Definition: DTGeometryParsFromDD.h:29
DTRecoIdealDBLoader
Definition: DTRecoIdealDBLoader.cc:22
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
DTRecoIdealDBLoader::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: DTRecoIdealDBLoader.cc:28
DTGeometryParsFromDD.h
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
DTRecoIdealDBLoader::fromDD4Hep_
bool fromDD4Hep_
Definition: DTRecoIdealDBLoader.cc:31
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:213
DTGeometryParsFromDD::build
void build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig)
Definition: DTGeometryParsFromDD.cc:42
cms::DDCompactView
Definition: DDCompactView.h:31
EventSetup.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:128
ParameterSet.h
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
RecoIdealGeometry
Definition: RecoIdealGeometry.h:28