CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalMustacheSCParametersMaker.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RecoEcal/EcalMustacheSCParametersMaker
4 // Class: EcalMustacheSCParametersMaker
5 //
13 //
14 // Original Author: Thomas Reis
15 // Created: Thu, 05 Nov 2020 09:18:19 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 
51 
53  const auto& esParams = iSetup.getData(parametersToken_);
54 
56  if (poolDbService.isAvailable()) {
57  poolDbService->writeOneIOV(esParams, poolDbService->currentTime(), "EcalMustacheSCParametersRcd");
58  } else {
59  throw cms::Exception("PoolDBService") << "No PoolDBService available.";
60  }
61 }
62 
65  descriptions.addDefault(desc);
66 }
67 
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > parametersToken_
EcalMustacheSCParametersMaker(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void analyze(const edm::Event &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getData(T &iHolder) const
Definition: EventSetup.h:122
int iEvent
Definition: GenABIO.cc:224
void addDefault(ParameterSetDescription const &psetDescription)
bool isAvailable() const
Definition: Service.h:40
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283