CMS 3D CMS Logo

RPCRecoIdealDBLoader.cc
Go to the documentation of this file.
17 
18 class RPCRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
19 public:
21 
22  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
23  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
24  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
25 };
26 
30  if (!mydbservice.isAvailable()) {
31  edm::LogError("RPCRecoIdealDBLoader") << "PoolDBOutputService unavailable";
32  return;
33  }
34 
37  es.get<IdealGeometryRecord>().get(pDD);
38  es.get<IdealGeometryRecord>().get(pMNDC);
39 
40  const DDCompactView& cpv = *pDD;
42 
43  rpcpd.build(&cpv, *pMNDC, *rig);
44 
45  if (mydbservice->isNewTagRequest("RPCRecoGeometryRcd")) {
46  mydbservice->createNewIOV<RecoIdealGeometry>(
47  rig, mydbservice->beginOfTime(), mydbservice->endOfTime(), "RPCRecoGeometryRcd");
48  } else {
49  edm::LogError("RPCRecoIdealDBLoader") << "RPCRecoGeometryRcd Tag is already present.";
50  }
51 }
52 
RPCRecoIdealDBLoader::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: RPCRecoIdealDBLoader.cc:27
RPCGeometryParsFromDD::build
void build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo)
Definition: RPCGeometryParsFromDD.cc:29
EDAnalyzer.h
ESTransientHandle.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
ESHandle.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
RPCRecoIdealDBLoader::RPCRecoIdealDBLoader
RPCRecoIdealDBLoader(const edm::ParameterSet &)
Definition: RPCRecoIdealDBLoader.cc:20
DDCompactView.h
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
RPCRecoIdealDBLoader
Definition: RPCRecoIdealDBLoader.cc:18
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
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
edm::ESHandle
Definition: DTSurvey.h:22
RPCRecoGeometryRcd.h
RecoIdealGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
Event.h
RPCGeometryParsFromDD
Definition: RPCGeometryParsFromDD.h:22
edm::Service< cond::service::PoolDBOutputService >
RPCRecoIdealDBLoader::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: RPCRecoIdealDBLoader.cc:24
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
RPCGeometryParsFromDD.h
get
#define get
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:175
EventSetup.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:90
RPCRecoIdealDBLoader::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: RPCRecoIdealDBLoader.cc:23
ParameterSet.h
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27
RecoIdealGeometry
Definition: RecoIdealGeometry.h:28