All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DummyProducer_module.cc
Go to the documentation of this file.
1 /**
2  * @file DummyProducer_module.cc
3  * @brief An _art_ producer which does nothing.
4  * @author Gianluca Petrillo (petrillo@slac.stanford.edu)
5  * @date July 15, 2021
6  *
7  */
8 
9 // framework libraries
10 #include "art/Framework/Core/SharedProducer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 
13 
14 //------------------------------------------------------------------------------
15 /**
16  * @brief Module which does nothing.
17  * @see DummyFilter
18  *
19  * This module accepts any FHiCL configuration (which it ignores), acts like a
20  * producer that does not consume anything and does not produce anything.
21  *
22  * It is a "good" way to remove a producer module from a job without having to
23  * mess with much configuration: just target it with a:
24  *
25  * physics.producers.redundantfilter.module_type: DummyProducer
26  *
27  *
28  * Configuration parameters
29  * =========================
30  *
31  * Anything.
32  *
33  */
34 class DummyProducer: public art::SharedProducer {
35 
36  public:
37 
38  DummyProducer(fhicl::ParameterSet const& params, const art::ProcessingFrame&)
39  : art::SharedProducer{ params }
40  { async<art::InEvent>(); }
41 
42  virtual void produce(art::Event&, const art::ProcessingFrame&) override {}
43 
44 }; // class DummyProducer
45 
46 
47 DEFINE_ART_MODULE(DummyProducer)
48 
49 //------------------------------------------------------------------------------
50 
Module which does nothing.
DummyProducer(fhicl::ParameterSet const &params, const art::ProcessingFrame &)
virtual void produce(art::Event &, const art::ProcessingFrame &) override