DoubleProducer_module.cc
Go to the documentation of this file.
1 //--------------------------------------------------------------------
2 //
3 // Produces an DoubleProduct instance.
4 //
5 //--------------------------------------------------------------------
6 
12 #include "fhiclcpp/ParameterSet.h"
13 
14 #include <iostream>
15 #include <memory>
16 
17 namespace arttest {
18  class DoubleProducer;
19 }
20 
22 public:
24  : EDProducer{p}, value_(p.get<double>("dvalue"))
25  {
26  produces<DoubleProduct>();
27  }
28 
29 private:
30  void produce(art::Event& e) override;
31 
32  double const value_;
33 }; // DoubleProducer
34 
35 void
37 {
38  e.put(std::make_unique<DoubleProduct>(value_));
39 }
40 
DoubleProducer(fhicl::ParameterSet const &p)
EDProducer()=default
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
void produce(art::Event &e) override
p
Definition: test.py:228
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692