CMS 3D CMS Logo

SiStripApvSimulationParametersBuilder.cc
Go to the documentation of this file.
6 
8 public:
11 
12  void analyze(const edm::Event&, const edm::EventSetup&) override;
13 };
14 
17  evtSetup.get<SiStripApvSimulationParametersRcd>().get(objHandle);
18 
19  // copy; DB service needs non-const pointer but does not take ownership
20  auto obj = std::make_unique<SiStripApvSimulationParameters>(*objHandle);
21 
23  if (mydbservice.isAvailable()) {
24  if (mydbservice->isNewTagRequest("SiStripApvSimulationParametersRcd")) {
26  obj.get(), mydbservice->beginOfTime(), mydbservice->endOfTime(), "SiStripApvSimulationParametersRcd");
27  } else {
28  mydbservice->appendSinceTime<SiStripApvSimulationParameters>(obj.get(), mydbservice->currentTime(), "SiStripApvSimulationParametersRcd");
29  }
30  } else {
31  edm::LogError("SiStripApvSimulationParametersBuilder") << "Service is unavailable";
32  }
33 }
34 
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void analyze(const edm::Event &, const edm::EventSetup &) override
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
SiStripApvSimulationParametersBuilder(const edm::ParameterSet &iConfig)
T get() const
Definition: EventSetup.h:71