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