ESPrimaryProducer_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: ESPrimaryProducer
3 // Module Type: producer
4 // File: ESPrimaryProducer_module.cc
5 //
6 // Generated at Mon Feb 3 11:00:13 2014 by Christopher Green using artmod
7 // from cetpkgsupport v1_05_03.
8 ////////////////////////////////////////////////////////////////////////
9 
18 #include "fhiclcpp/ParameterSet.h"
19 
20 #include <memory>
21 
22 namespace arttest {
23  class ESPrimaryProducer;
24 }
25 
27 public:
28  explicit ESPrimaryProducer(fhicl::ParameterSet const&);
29 
30 private:
31  void produce(art::Event& e) override;
32 };
33 
35  : EDProducer{ps}
36 {
37  produces<arttest::VSimpleProduct>();
38 }
39 
40 void
42 {
43  constexpr size_t vspSize{5};
44  constexpr double vspVal{1.5};
45  auto vsp = std::make_unique<VSimpleProduct>(vspSize);
46 
47  size_t count{};
48  for (auto& s : *vsp) {
49  s.key = count;
50  s.value = count * vspVal;
51  ++count;
52  }
53  e.put(std::move(vsp));
54 }
55 
void produce(art::Event &e) override
static const double ps
Definition: Units.h:103
EDProducer()=default
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
ESPrimaryProducer(fhicl::ParameterSet const &)
static const double s
Definition: Units.h:99
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692