CMS 3D CMS Logo

ME0RecoIdealDBLoader.cc
Go to the documentation of this file.
6 
14 
15 class ME0RecoIdealDBLoader : 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("ME0RecoIdealDBLoader") << "ME0RecoIdealDBLoader::beginRun";
26 
28  if (!mydbservice.isAvailable()) {
29  edm::LogError("ME0RecoIdealDBLoader") << "PoolDBOutputService unavailable";
30  return;
31  }
32 
33  if (mydbservice->isNewTagRequest("ME0RecoGeometryRcd")) {
36  es.get<IdealGeometryRecord>().get(pDD);
37  es.get<IdealGeometryRecord>().get(pMNDC);
38 
39  const DDCompactView& cpv = *pDD;
41 
43  me0pd.build(&cpv, *pMNDC, *rig);
44 
45  mydbservice->createNewIOV<RecoIdealGeometry>(
46  rig, mydbservice->beginOfTime(), mydbservice->endOfTime(), "ME0RecoGeometryRcd");
47  } else {
48  edm::LogError("ME0RecoIdealDBLoader") << "ME0RecoGeometryRcd Tag is already present";
49  }
50 }
51 
EDAnalyzer.h
ESTransientHandle.h
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:187
ESHandle.h
edm::Run
Definition: Run.h:45
MuonGeometryConstants.h
ME0RecoIdealDBLoader::ME0RecoIdealDBLoader
ME0RecoIdealDBLoader(const edm::ParameterSet &)
Definition: ME0RecoIdealDBLoader.cc:17
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
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:110
Service.h
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
edm::ESHandle
Definition: DTSurvey.h:22
RecoIdealGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
ME0GeometryParsFromDD.h
ME0RecoIdealDBLoader::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: ME0RecoIdealDBLoader.cc:20
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
ME0RecoIdealDBLoader
Definition: ME0RecoIdealDBLoader.cc:15
ME0RecoIdealDBLoader::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: ME0RecoIdealDBLoader.cc:24
edm::EventSetup
Definition: EventSetup.h:57
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
ME0RecoIdealDBLoader::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: ME0RecoIdealDBLoader.cc:21
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
ME0GeometryParsFromDD::build
void build(const DDCompactView *, const MuonGeometryConstants &, RecoIdealGeometry &)
Definition: ME0GeometryParsFromDD.cc:13
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:185
ME0RecoGeometryRcd.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:100
ME0GeometryParsFromDD
Definition: ME0GeometryParsFromDD.h:12
edm::Event
Definition: Event.h:73
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
RecoIdealGeometry
Definition: RecoIdealGeometry.h:28