CMS 3D CMS Logo

DTRecoIdealDBLoader.cc
Go to the documentation of this file.
15 
16 class DTRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns>
17 {
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 
26 void
28 {
31  if( !mydbservice.isAvailable() ){
32  edm::LogError("DTRecoIdealDBLoader")<<"PoolDBOutputService unavailable";
33  return;
34  }
35 
38  es.get<IdealGeometryRecord>().get( pDD );
39  es.get<MuonNumberingRecord>().get( pMNDC );
40 
41  const DDCompactView& cpv = *pDD;
43 
44  dtgp.build( &cpv, *pMNDC, *rig );
45 
46  if ( mydbservice->isNewTagRequest("DTRecoGeometryRcd") ) {
47  mydbservice->createNewIOV<RecoIdealGeometry>(rig
48  , mydbservice->beginOfTime()
49  , mydbservice->endOfTime()
50  , "DTRecoGeometryRcd");
51  } else {
52  edm::LogError("DTRecoIdealDBLoader")<<"DTRecoGeometryRcd Tag is already present.";
53  }
54 }
55 
DTRecoIdealDBLoader(edm::ParameterSet const &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
int iEvent
Definition: GenABIO.cc:230
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
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)
const T & get() const
Definition: EventSetup.h:58
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
void build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rig)
Definition: Run.h:43