CMS 3D CMS Logo

TestESProducers.cc
Go to the documentation of this file.
8 
9 namespace cms::alpakatest {
10  template <typename TProduct, typename TRecord>
12  public:
13  TestESProducerT(edm::ParameterSet const& iConfig) : value_(iConfig.getParameter<int>("value")) {
14  setWhatProduced(this);
15  }
16 
17  std::optional<TProduct> produce(TRecord const& iRecord) { return TProduct(value_); }
18 
19  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
21  desc.add<int>("value");
22  descriptions.addWithDefaultLabel(desc);
23  }
24 
25  private:
26  int const value_;
27  };
28 
32 } // namespace cms::alpakatest
33 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
TestESProducerT(edm::ParameterSet const &iConfig)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::optional< TProduct > produce(TRecord const &iRecord)