CMS 3D CMS Logo

GEMRecoIdealDBLoader.cc
Go to the documentation of this file.
6 
14 
15 class GEMRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
16 public:
18 
19  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
20  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
21  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
22 };
23 
25  edm::LogInfo("GEMRecoIdealDBLoader") << "GEMRecoIdealDBLoader::beginRun";
26 
28  if (!mydbservice.isAvailable()) {
29  edm::LogError("GEMRecoIdealDBLoader") << "PoolDBOutputService unavailable";
30  return;
31  }
32 
33  if (mydbservice->isNewTagRequest("GEMRecoGeometryRcd")) {
36  es.get<IdealGeometryRecord>().get(pDD);
37  es.get<IdealGeometryRecord>().get(pMNDC);
38 
39  const DDCompactView& cpv = *pDD;
41 
43  rpcpd.build(&cpv, *pMNDC, *rig);
44 
45  mydbservice->createNewIOV<RecoIdealGeometry>(
46  rig, mydbservice->beginOfTime(), mydbservice->endOfTime(), "GEMRecoGeometryRcd");
47  } else {
48  edm::LogError("GEMRecoIdealDBLoader") << "GEMRecoGeometryRcd Tag is already present";
49  }
50 }
51 
EDAnalyzer.h
ESTransientHandle.h
GEMGeometryParsFromDD
Definition: GEMGeometryParsFromDD.h:22
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
ESHandle.h
GEMRecoIdealDBLoader::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: GEMRecoIdealDBLoader.cc:24
edm::Run
Definition: Run.h:45
GEMRecoIdealDBLoader
Definition: GEMRecoIdealDBLoader.cc:15
MuonGeometryConstants.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
MuonNumberingRecord.h
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
DDCompactView.h
GEMRecoIdealDBLoader::GEMRecoIdealDBLoader
GEMRecoIdealDBLoader(const edm::ParameterSet &)
Definition: GEMRecoIdealDBLoader.cc:17
MakerMacros.h
PoolDBOutputService.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
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
GEMGeometryParsFromDD::build
void build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo)
Definition: GEMGeometryParsFromDD.cc:28
RecoIdealGeometry.h
GEMGeometryParsFromDD.h
GEMRecoIdealDBLoader::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: GEMRecoIdealDBLoader.cc:21
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
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
GEMRecoIdealDBLoader::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: GEMRecoIdealDBLoader.cc:20
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:128
GEMRecoGeometryRcd.h
edm::Event
Definition: Event.h:73
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
RecoIdealGeometry
Definition: RecoIdealGeometry.h:28