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 {
19 public:
21 
22  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
23  void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {}
24  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {}
25 };
26 
27 void
29 {
30  edm::LogInfo("CSCRecoIdealDBLoader")<<"CSCRecoIdealDBLoader::beginRun";
31 
35  if( !mydbservice.isAvailable() ){
36  edm::LogError("CSCRecoIdealDBLoader")<<"PoolDBOutputService unavailable";
37  return;
38  }
39 
42  es.get<IdealGeometryRecord>().get( pDD );
43  es.get<MuonNumberingRecord>().get( pMNDC );
44 
45  const DDCompactView& cpv = *pDD;
47 
48  cscgp.build( &cpv, *pMNDC, *rig, *rdp );
49 
50  if ( mydbservice->isNewTagRequest("CSCRecoGeometryRcd") ) {
51  mydbservice->createNewIOV<RecoIdealGeometry>(rig
52  , mydbservice->beginOfTime()
53  , mydbservice->endOfTime()
54  , "CSCRecoGeometryRcd");
55  } else {
56  edm::LogError("CSCRecoIdealDBLoader")<<"CSCRecoGeometryRcd Tag is already present.";
57  }
58  if ( mydbservice->isNewTagRequest("CSCRecoDigiParametersRcd") ) {
59  mydbservice->createNewIOV<CSCRecoDigiParameters>(rdp
60  , mydbservice->beginOfTime()
61  , mydbservice->endOfTime()
62  , "CSCRecoDigiParametersRcd");
63  } else {
64  edm::LogError("CSCRecoIdealDBLoader")<<"CSCRecoDigiParametersRcd Tag is already present.";
65  }
66 }
67 
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:71
Definition: Run.h:45