TestMetadata_plugin.cc
Go to the documentation of this file.
2 
6 
7 #include <iostream>
8 #include <string>
9 
10 namespace arttest {
11  class TestMetadata;
12 }
13 
15 public:
16  TestMetadata(fhicl::ParameterSet const& pset);
17 
18 private:
19  void beginJob() override;
20  void endJob() override;
21  void collectMetadata(art::Event const& e) override;
22  void beginRun(art::Run const& r) override;
23  void endRun(art::Run const& r) override;
24  void beginSubRun(art::SubRun const& sr) override;
25  void endSubRun(art::SubRun const& sr) override;
27 };
28 
31 {}
32 
33 void
35 {
36  std::cout << "TestMetadataPlugin::beginJob()" << std::endl;
37 }
38 
39 void
41 {
42  std::cout << "TestMetadataPlugin::endJob()" << std::endl;
43 }
44 
45 void
47 {
48  std::cout << "TestMetadataPlugin::collectMetadata()" << std::endl;
49 }
50 
51 void
53 {
54  std::cout << "TestMetadataPlugin::beginRun()" << std::endl;
55 }
56 
57 void
59 {
60  std::cout << "TestMetadataPlugin::endRun()" << std::endl;
61 }
62 
63 void
65 {
66  std::cout << "TestMetadataPlugin::beginSubRun()" << std::endl;
67 }
68 
69 void
71 {
72  std::cout << "TestMetadataPlugin::endSubRun()" << std::endl;
73 }
74 
75 auto
77 {
78  collection_type result{{"key1", "\"value1\""}, {"key2", "\"value2\""}};
79  std::cout << "TestMetadataPlugin::produceMetadata()" << std::endl;
80  return result;
81 }
82 
collection_type produceMetadata() override
TestMetadata(fhicl::ParameterSet const &pset)
FileCatalogMetadata::collection_type collection_type
Definition: Run.h:21
const double e
void beginSubRun(art::SubRun const &sr) override
FileCatalogMetadataPlugin(fhicl::ParameterSet const &pset)
void collectMetadata(art::Event const &e) override
void endSubRun(art::SubRun const &sr) override
#define DEFINE_ART_FILECATALOGMETADATA_PLUGIN(klass)
void beginRun(art::Run const &r) override
void endRun(art::Run const &r) override
static const double sr
Definition: Units.h:167