CMS 3D CMS Logo

EcalSCDynamicDPhiParametersMaker.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RecoEcal/EcalSCDynamicDPhiParametersMaker
4 // Class: EcalSCDynamicDPhiParametersMaker
5 //
13 //
14 // Original Author: Thomas Reis
15 // Created: Thu, 05 Nov 2020 12:32:03 GMT
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
25 
30 
36 
38 public:
40 
41  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
42 
43 private:
44  void analyze(const edm::Event&, const edm::EventSetup&) override;
45 
47 };
48 
50  : parametersToken_(esConsumes<EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd>()) {}
51 
54 
56  if (poolDbService.isAvailable()) {
57  poolDbService->writeOne(esParamsHandle_.product(), poolDbService->currentTime(), "EcalSCDynamicDPhiParametersRcd");
58  } else {
59  throw cms::Exception("PoolDBService") << "No PoolDBService available.";
60  }
61 }
62 
65  descriptions.addDefault(desc);
66 }
67 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EDAnalyzer.h
EcalSCDynamicDPhiParametersMaker::parametersToken_
edm::ESGetToken< EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd > parametersToken_
Definition: EcalSCDynamicDPhiParametersMaker.cc:46
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EcalSCDynamicDPhiParametersMaker
Definition: EcalSCDynamicDPhiParametersMaker.cc:37
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
MakerMacros.h
PoolDBOutputService.h
EcalSCDynamicDPhiParametersRcd.h
EcalSCDynamicDPhiParametersMaker::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: EcalSCDynamicDPhiParametersMaker.cc:52
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
EcalSCDynamicDPhiParametersMaker::EcalSCDynamicDPhiParametersMaker
EcalSCDynamicDPhiParametersMaker(const edm::ParameterSet &)
Definition: EcalSCDynamicDPhiParametersMaker.cc:49
EcalSCDynamicDPhiParameters
Definition: EcalSCDynamicDPhiParameters.h:13
edm::ESHandle
Definition: DTSurvey.h:22
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
EcalSCDynamicDPhiParameters.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
edm::Service< cond::service::PoolDBOutputService >
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
edm::EventSetup
Definition: EventSetup.h:57
edm::ESGetToken< EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd >
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
EcalSCDynamicDPhiParametersRcd
Definition: EcalSCDynamicDPhiParametersRcd.h:23
Frameworkfwd.h
Exception
Definition: hltDiff.cc:246
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:57
EcalSCDynamicDPhiParametersMaker::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EcalSCDynamicDPhiParametersMaker.cc:63
EventSetup.h
Exception.h
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition: PoolDBOutputService.cc:189