CMS 3D CMS Logo

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