CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SiStripApvSimulationParametersBuilder.cc
Go to the documentation of this file.
7 
9 public:
12 
13  void analyze(const edm::Event&, const edm::EventSetup&) override;
14 
15 private:
17 };
18 
20  // copy; DB service needs non-const pointer but does not take ownership
21  auto obj = std::make_unique<SiStripApvSimulationParameters>(evtSetup.getData(m_parametersToken));
22 
24  if (mydbservice.isAvailable()) {
25  if (mydbservice->isNewTagRequest("SiStripApvSimulationParametersRcd")) {
27  *obj, mydbservice->beginOfTime(), "SiStripApvSimulationParametersRcd");
28  } else {
29  mydbservice->appendOneIOV<SiStripApvSimulationParameters>(
30  *obj, mydbservice->currentTime(), "SiStripApvSimulationParametersRcd");
31  }
32  } else {
33  edm::LogError("SiStripApvSimulationParametersBuilder") << "Service is unavailable";
34  }
35 }
36 
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
const edm::ESGetToken< SiStripApvSimulationParameters, SiStripApvSimulationParametersRcd > m_parametersToken
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
SiStripApvSimulationParametersBuilder(const edm::ParameterSet &iConfig)