TestProvenanceDumper_module.cc
Go to the documentation of this file.
4 
6 
7 #include <iostream>
8 #include <set>
9 
10 namespace arttest {
11  class PDDetail;
12 
14 } // namespace arttest
15 
17 public:
18  // The configuration here MUST be called 'Config'
19  struct Config {
21  false};
23  false};
24  };
25 
27  : nExpected_(9u + ps().expectSubRunProducts() + ps().expectRunProducts())
29  {}
30 
32  {
33  // Required to be sure that we actually did the main check!
34  BOOST_CHECK(functionsCalled_.find("endJob") != functionsCalled_.end());
35  }
36 
37  void
39  {
40  functionsCalled_.insert("beginJob");
41  }
42 
43  void
45  {
46  functionsCalled_.insert("endJob");
48  std::ostream_iterator<std::string>(std::cout, "\n"));
49  BOOST_REQUIRE_EQUAL(functionsCalled_.size(), nExpected_);
50  }
51 
52  void
54  {
55  functionsCalled_.insert("preProcessEvent");
56  }
57 
58  void
60  {
61  functionsCalled_.insert("processEventProvenance");
62  std::cout << prov << std::endl;
63  }
64 
65  void
67  {
68  functionsCalled_.insert("postProcessEvent");
69  }
70 
71  void
73  {
74  functionsCalled_.insert("preProcessSubRun");
75  }
76 
77  void
79  {
80  functionsCalled_.insert("processSubRunProvenance");
81  std::cout << prov << std::endl;
82  }
83 
84  void
86  {
87  functionsCalled_.insert("postProcessSubRun");
88  }
89 
90  void
92  {
93  functionsCalled_.insert("preProcessRun");
94  }
95 
96  void
98  {
99  functionsCalled_.insert("processRunProvenance");
100  std::cout << prov << std::endl;
101  }
102 
103  void
105  {
106  functionsCalled_.insert("postProcessRun");
107  }
108 
109 private:
110  size_t nExpected_;
111  std::set<std::string> functionsCalled_;
112 };
113 
static const double ps
Definition: Units.h:103
void processEventProvenance(art::Provenance const &prov)
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
void processSubRunProvenance(art::Provenance const &prov)
auto copy_all(FwdCont &, FwdIter)
std::set< std::string > functionsCalled_
void processRunProvenance(art::Provenance const &prov)
PDDetail(fhicl::TableFragment< Config > const &ps)
AdcRoiViewer::Name Name