CMS 3D CMS Logo

GEMRecoIdealDBLoader.cc
Go to the documentation of this file.
6 
14 
15 class GEMRecoIdealDBLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns>
16 {
17 public:
18 
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 {
29  edm::LogInfo("GEMRecoIdealDBLoader")<<"GEMRecoIdealDBLoader::beginRun";
30 
32  if( !mydbservice.isAvailable())
33  {
34  edm::LogError( "GEMRecoIdealDBLoader" ) << "PoolDBOutputService unavailable";
35  return;
36  }
37 
38  if( mydbservice->isNewTagRequest( "GEMRecoGeometryRcd" ))
39  {
42  es.get<IdealGeometryRecord>().get( pDD );
43  es.get<MuonNumberingRecord>().get( pMNDC );
44 
45  const DDCompactView& cpv = *pDD;
47 
49  rpcpd.build( &cpv, *pMNDC, *rig );
50 
51  mydbservice->createNewIOV<RecoIdealGeometry>( rig,
52  mydbservice->beginOfTime(),
53  mydbservice->endOfTime(),
54  "GEMRecoGeometryRcd" );
55  }
56  else
57  {
58  edm::LogError( "GEMRecoIdealDBLoader" ) << "GEMRecoGeometryRcd Tag is already present";
59  }
60 }
61 
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:90
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
GEMRecoIdealDBLoader(const edm::ParameterSet &)
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 endRun(edm::Run const &iEvent, edm::EventSetup const &) override
const T & get() const
Definition: EventSetup.h:56
void analyze(edm::Event const &iEvent, edm::EventSetup const &) override
Definition: Run.h:42