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<MuonNumberingRecord>().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 
CSCRecoIdealDBLoader(edm::ParameterSet const &)
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
bool build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rig, CSCRecoDigiParameters &rdp)
Build the geometry returning the RecoIdealGeometry and the CSCRecoDigiParameters objects.
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
T get() const
Definition: EventSetup.h:73
Definition: Run.h:45