CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
WritePPSAlignmentConfiguration.cc
Go to the documentation of this file.
1 /****************************************************************************
2 * Author:
3 * Mateusz Kocot (mateuszkocot99@gmail.com)
4 ****************************************************************************/
5 
12 
15 
17 
20 
21 #include <memory>
22 
24 public:
26 
27 private:
28  void analyze(const edm::Event &, const edm::EventSetup &) override;
29 
31 };
32 
35  edm::ESInputTag("", iConfig.getParameter<std::string>("label")))) {}
36 
38  // get the data
39  const auto &ppsAlignmentConfiguration = iSetup.getData(esToken_);
40 
41  // store the data in a DB object
43  if (poolDbService.isAvailable()) {
44  poolDbService->writeOneIOV(ppsAlignmentConfiguration, poolDbService->currentTime(), "PPSAlignmentConfigurationRcd");
45  } else {
46  throw cms::Exception("WritePPSAlignmentConfiguration") << "PoolDBService required.";
47  }
48 }
49 
50 //define this as a plug-in
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:128
int iEvent
Definition: GenABIO.cc:224
bool isAvailable() const
Definition: Service.h:40
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
WritePPSAlignmentConfiguration(const edm::ParameterSet &)
edm::ESGetToken< PPSAlignmentConfiguration, PPSAlignmentConfigurationRcd > esToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283