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<MuonNumberingRecord>().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 
void build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rgeo)
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
GEMRecoIdealDBLoader(const edm::ParameterSet &)
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 endRun(edm::Run const &iEvent, edm::EventSetup const &) override
T get() const
Definition: EventSetup.h:73
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: Run.h:45