CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
type of data representation of DDCompactView
Definition: DDCompactView.h:77
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: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)
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
const T & get() const
Definition: EventSetup.h:56
Definition: Run.h:43