CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
type of data representation of DDCompactView
Definition: DDCompactView.h:77
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
int iEvent
Definition: GenABIO.cc:230
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:46
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
RPCRecoIdealDBLoader(const edm::ParameterSet &)
const T & get() const
Definition: EventSetup.h:56
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: Run.h:43