CMS 3D CMS Logo

RPCRecoIdealDBLoader.cc
Go to the documentation of this file.
17 
18 class RPCRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns>
19 {
20 public:
21 
23 
24  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
25  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
26  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
27 };
28 
29 void
31 {
34  if( !mydbservice.isAvailable() ){
35  edm::LogError("RPCRecoIdealDBLoader")<<"PoolDBOutputService unavailable";
36  return;
37  }
38 
41  es.get<IdealGeometryRecord>().get( pDD );
42  es.get<MuonNumberingRecord>().get( pMNDC );
43 
44  const DDCompactView& cpv = *pDD;
46 
47  rpcpd.build( &cpv, *pMNDC, *rig );
48 
49  if ( mydbservice->isNewTagRequest("RPCRecoGeometryRcd") ) {
50  mydbservice->createNewIOV<RecoIdealGeometry>(rig
51  , mydbservice->beginOfTime()
52  , mydbservice->endOfTime()
53  , "RPCRecoGeometryRcd");
54  } else {
55  edm::LogError("RPCRecoIdealDBLoader")<<"RPCRecoGeometryRcd Tag is already present.";
56  }
57 }
58 
void build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rgeo)
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
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)
RPCRecoIdealDBLoader(const edm::ParameterSet &)
T get() const
Definition: EventSetup.h:71
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: Run.h:45