CMS 3D CMS Logo

CSCRecoIdealDBLoader.cc
Go to the documentation of this file.
16 
17 class CSCRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
18 public:
20 
21  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
22  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
23  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
24 };
25 
27  edm::LogInfo("CSCRecoIdealDBLoader") << "CSCRecoIdealDBLoader::beginRun";
28 
32  if (!mydbservice.isAvailable()) {
33  edm::LogError("CSCRecoIdealDBLoader") << "PoolDBOutputService unavailable";
34  return;
35  }
36 
39  es.get<IdealGeometryRecord>().get(pDD);
40  es.get<IdealGeometryRecord>().get(pMNDC);
41 
42  const DDCompactView& cpv = *pDD;
44 
45  cscgp.build(&cpv, *pMNDC, *rig, *rdp);
46 
47  if (mydbservice->isNewTagRequest("CSCRecoGeometryRcd")) {
48  mydbservice->createNewIOV<RecoIdealGeometry>(
49  rig, mydbservice->beginOfTime(), mydbservice->endOfTime(), "CSCRecoGeometryRcd");
50  } else {
51  edm::LogError("CSCRecoIdealDBLoader") << "CSCRecoGeometryRcd Tag is already present.";
52  }
53  if (mydbservice->isNewTagRequest("CSCRecoDigiParametersRcd")) {
54  mydbservice->createNewIOV<CSCRecoDigiParameters>(
55  rdp, mydbservice->beginOfTime(), mydbservice->endOfTime(), "CSCRecoDigiParametersRcd");
56  } else {
57  edm::LogError("CSCRecoIdealDBLoader") << "CSCRecoDigiParametersRcd Tag is already present.";
58  }
59 }
60 
CSCGeometryParsFromDD::build
bool build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig, CSCRecoDigiParameters &rdp)
Build the geometry returning the RecoIdealGeometry and the CSCRecoDigiParameters objects.
Definition: CSCGeometryParsFromDD.cc:48
EDAnalyzer.h
ESTransientHandle.h
CSCRecoDigiParameters
Definition: CSCRecoDigiParameters.h:18
cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:177
ESHandle.h
edm::Run
Definition: Run.h:45
CSCRecoIdealDBLoader::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: CSCRecoIdealDBLoader.cc:23
MuonGeometryConstants.h
edm::LogInfo
Definition: MessageLogger.h:254
CSCRecoIdealDBLoader::CSCRecoIdealDBLoader
CSCRecoIdealDBLoader(edm::ParameterSet const &)
Definition: CSCRecoIdealDBLoader.cc:19
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
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:73
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
CSCRecoGeometryRcd.h
edm::ESHandle
Definition: DTSurvey.h:22
CSCGeometryParsFromDD
Definition: CSCGeometryParsFromDD.h:32
CSCRecoIdealDBLoader::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: CSCRecoIdealDBLoader.cc:22
RecoIdealGeometry.h
CSCRecoDigiParameters.h
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:175
CSCRecoIdealDBLoader
Definition: CSCRecoIdealDBLoader.cc:17
CSCGeometryParsFromDD.h
EventSetup.h
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:90
CSCRecoDigiParametersRcd.h
MuonGeometryRecord.h
CSCRecoIdealDBLoader::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: CSCRecoIdealDBLoader.cc:26
edm::Event
Definition: Event.h:73
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27
RecoIdealGeometry
Definition: RecoIdealGeometry.h:28