InputProducer_module.cc
Go to the documentation of this file.
1 //--------------------------------------------------------------------
2 //
3 // Produces an InputProducer instance.
4 //
5 //--------------------------------------------------------------------
6 
12 
14 
15 namespace fhicl {
16  class ParameterSet;
17 }
18 
19 namespace arttest {
20 
21  class InputProducer : public art::EDProducer {
22  public:
24  {
25  produces<StringProduct>();
26  produces<StringProduct, art::InSubRun>("endSubRun");
27  produces<StringProduct, art::InRun>("endRun");
28  }
29 
30  virtual void
31  endRun(art::Run& r) override
32  {
33  r.put(std::make_unique<StringProduct>("endRun"),
34  "endRun",
36  }
37 
38  virtual void
40  {
41  sr.put(std::make_unique<StringProduct>("endSubRun"),
42  "endSubRun",
44  }
45 
46  virtual void
47  produce(art::Event& e) override
48  {
49  e.put(std::make_unique<StringProduct>("event"));
50  }
51  };
52 
53 } // namespace arttest
54 
InputProducer(fhicl::ParameterSet const &)
virtual void produce(art::Event &e) override
Definition: Run.h:21
constexpr auto runFragment()
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
parameter set interface
constexpr auto subRunFragment()
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692
virtual void endRun(art::Run &r) override
static const double sr
Definition: Units.h:167
virtual void endSubRun(art::SubRun &sr) override